thepgi / bge-logic-nodes-add-on

add-on for the blender game engine (2.7) to create node-based logic
8 stars 5 forks source link

Get GameObject Member> LocalOrientation and World orientation returns <0,0,0>.. #4

Closed vuniverse closed 8 years ago

vuniverse commented 8 years ago

OK this is complicated. So i added file. Get GameObject Member> LocalOrientation and World orientation parameters xyz returns 0 all the time. If i use "Vector" to split orientation always each value reported 0 If i use "Vector 4" to split orientation always each value reported 0 unless i try to get W value. If i try to get W value ( connecting exit node of W to something ) this time all returns nothing .. Even not changing textboxes. If i unplug W. Then x y z turns to zero again.. I attach the file so you can test .

vuniverse commented 8 years ago

FILE : Local orientaion reported empty.zip

thepgi commented 8 years ago

The Local Orientation is a 3x3 Matrix, if you pass it to a Vector node you only get the first four components of it. There is an Orientation node in the Math group to deal with orientation values.

vuniverse commented 8 years ago

Isn't orientation a quaternion ? I guessed so .. that's where i am lost i guess. O.O I searched the web for orientation and could not find something. when i plug the orientation value to orientation node and get values I get values. I am lost.. Do you suggest some page i can read about this ?

thepgi commented 8 years ago

That LocalOrientation node points to this game object field:

https://www.blender.org/api/blender_python_api_2_77a_release/bge.types.KX_GameObject.html?highlight=localorientation#bge.types.KX_GameObject.localOrientation

Unfortunately there's no way I know of to add to the add-on some sort of contextual documentation, so that the user would know exactly what that "orientation" output does. Common user interfaces do that with a small ? button near the control. I could add this help button but I haven't figured out a way to display readable information to the user. That's a missing corner stone in making the addon itself really usable.

vuniverse commented 8 years ago

thank you pgi. I will stick with radians and walksarounds for now ..I will check this and more.. At least now i have radians. I can understand them ..