• Advertisement
Sign in to follow this  

Direction Vector Problem

This topic is 2613 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
The description of exactly what you want to do isn't all that clear.

If you have coordinates ( px, py, pz ) and a normalized direction vector ( dx, dy, dz ), the new point = ( px + s*dx, py + s*dy, pz + s*dz ), where s is the distance you want to move.

Share this post


Link to post
Share on other sites
I have already done what you told me.

But this game is a bit "gay" laugh.gif The directions are strange, I don't know.

If I start the game and my direction vector is (1,0,0), if i turn around my vehicle of 360°, that vector should be the same(1,0,0), shouldn't it?

BUT IT IS NOT :( it's (-1,0,0)

I have to turn 720° to get that again (1,0,0)

Share this post


Link to post
Share on other sites

But this game is a bit "gay" laugh.gif The directions are strange, I don't know.

Seems like your rotation code is screwed up. My random guess? most trig functions take radians not degrees. Maybe that is whats wrong?

Share this post


Link to post
Share on other sites
Erm, Q-Circles again so soon, read: somewhere (and wrongly) using quaternions ?

That was just a far reached guess. Could you shed some more light by providing code, please ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement