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:

understanding 4x4 homogenous transform matrices


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -