You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
Because rotationToDirection() returns a unit (normalized) vector? It just rotates a unit vector by the euler angles. IMO the last part of code doesn`t make much sense at all.
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
I guess "rot" in your case means the orientation of the scene node and it is different from the rotation operation. If the rotation operation is done by matrix, then
Thank you so much! I still don't understand why my code didn't work though. rotationToDirection takes the vector you want to rotate as a parameter. Shouldn't my code just be rotating it and the rotating it right back?
Don't be misled by the function name "rotationToDirection". It really means "orientationToDirection" or "getDirectionVectorFromOrientation". The argument of "rotationToDirection" is the reference direction or heading of the scene node when