Results 1 to 10 of 14

Thread: Rotation issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    goddamn i still fail on this... i got it to align it on 3 sides, but the fourth is still ... WRONG...

    code so far..:
    Code:
    a = vectorToAngles( vectorNormalize( playerForward - vectorScale( tankUp , vectorDot( tankUp , playerForward ) ) ) ); //this projects the playerForward to the tanks x/y-plane
    r = vectorToAngles( tankUp - towerUp );
    tower rotateTo( ( a[0] , a[1] , r[0] ) , 0.1, 0 , 0 );
    i dont get it... lol why only on 3 sides?!

    green: tank angles
    blue: tower angles
    pink: player forward
    yellow: projected player forward on tanks xy plane
    numbers: r[0]
    Attachment 478
    Last edited by serthy; 14th October 2013 at 22:20.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •