michael.zhang Posted August 7, 2011 Share Posted August 7, 2011 Hello, I am confused by the idea of "direction" in the Unigine script API. Node node = new Node(); node.setWorldTransform(mat4_identity); vec3 world_d = node.getWorldDirection(); // vec3 = (0, 0, -1) // Direction seems to be by default forward -Z Since Unigine uses a +Z Up axis, that seems somewhat unintuitive. I would've expected +Y to be, or +X to be the default direction. For example, when you set a persecutor's phi and theta angles to be 0, it's facing down the +X axis. Michael Link to comment
steve3d Posted August 11, 2011 Share Posted August 11, 2011 +Y is default forward direction in unigine. check this: https://developer.unigine.com/forum/topic/239-serious-bug-in-softimage-export-plugin/ Link to comment
ulf.schroeter Posted August 11, 2011 Share Posted August 11, 2011 +Y is default forward direction in unigine. check this: https://developer.unigine.com/forum/topic/239-serious-bug-in-softimage-export-plugin/ Unfortunately player camera default frustum orientation (when world transform does not define any rotation) is in -Z direction. It really would be great to have an all-encompassing consistent convention for modelling (+Y definies longitudal axis of body e.g. car length axis), cameras (+Y defines forward frustum orientation) and character movement frame (+Y defines forward movement). Link to comment
michael.zhang Posted August 11, 2011 Author Share Posted August 11, 2011 Unfortunately player camera default frustum orientation (when world transform does not define any rotation) is in -Z direction. It really would be great to have an all-encompassing consistent convention for modelling (+Y definies longitudal axis of body e.g. car length axis), cameras (+Y defines forward frustum orientation) and character movement frame (+Y defines forward movement). Thanks for the response Steve. As Ulf said, I'm talking about an all encompassing convention. THough, I suspect at this point it would be difficult to change since it would break code in alot of places. At the least, document it clearly when a class' forward direction or a function's direction return is not using the same +Y forward convention as the engine's coordinate system. Link to comment
michael.zhang Posted September 3, 2011 Author Share Posted September 3, 2011 Yah, so show why this convention is annoying: +X is Foward for Player Actor movement -Z is default camera direction +Y is Forward in terms of unigine coordinate system +Z up Link to comment
Recommended Posts