Math Problem
i have the pitch and yaw angles along with a point in 3d space.how do i move it along the given direction??
i have employed the foll method-is it correct??
deltaX=dist * Sin(Yaw) * Cos(Pitch)
deltaY=dist * Sin(Pitch)
deltaZ=dist * Cos(Yaw) * Cos(Pitch)
here the dist is the distance moved by the point in the particular direction and Yaw and Pitch are the angles made with the Y & X axis respectively.
This formula fails when Yaw and Pitch are 45 degs=the vals i get are-
here dist=1-
deltaX=0.5
deltaY=1/(2^0.5) (one by root two!!)
deltaZ=0.5
but the increments are supposed to be equal if they are inclined at 45 degs to both axes.
Why is it like this?
Pls help me out!
Thanks a lot,
Hey Witchlord ( Thanks a million for ur PATIENCE!!! )
sandeep_kl@mailcity.com
Jayanth.K
Raptor
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement