math - Calculate forward and up vectors from euler position and rotation? -
i have object in 3d space have euler position , rotation. how can calculate forward , vectors information have?
i know can calculate forward vector in way:
vector3 forward = (target.getposition() - object.getposition()).normalize();
.. target point along axis object looking. using information have, how can pick arbitrary point in way normalize?
i'm not sure how go solving "up" vector @ all.
first create transform matrix euler angles (with same method using while rendering). extract axises vectors forward , directly. example view matrices uses z
axis forward/backward , x
axis left/right use two. find location of vectors here:
Comments
Post a Comment