Sign in to follow this  
OvidiuPop_179073

Direction Vector Problem

Recommended Posts

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 [b]s[/b] 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" [img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img] 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
[quote name='tlovidiu' timestamp='1298397026' post='4777600']
But this game is a bit "gay" [img]http://public.gamedev.net/public/style_emoticons/default/laugh.gif[/img] The directions are strange, I don't know.
[/quote]
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, [url="http://www.iracing.com/news/blog/q-circles-the-crop-circles-of-iracing/"]Q-Circles[/url] 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this