PDA

View Full Version : Why I get false in my listener?


HuaMuLan
03-10-2009, 07:26 PM
I want to check if model's Y_axis is pointing straight up.
This is what I run in my listener
The problem is obvious , why I get "false" in the end?

$.transform.row2
[0,0,1]
($.transform.row2 == [0,0,1])
false

HuaMuLan
03-11-2009, 11:38 AM
I have find the answer . It seems nobody want to help me because this topic is quite easy . But I 'd like to show the tricky result . Which may also frustrate someone else after :P Be attendtion!
http://www.maxforums.org/thread.aspx?tid=559656

eek
03-11-2009, 03:06 PM
I want to check if model's Y_axis is pointing straight up.
This is what I run in my listener
The problem is obvious , why I get "false" in the end?

$.transform.row2
[0,0,1]
($.transform.row2 == [0,0,1])
false



$.transform.row2 == [0,1,0]

or (dot transform.row2 [0,0,1]) == 0.0 -- but you might get floating point errors

or ($.transform * inverse (matrix3 1)).row2 == [0,0,1]

roughly

CGTalk Moderation
03-11-2009, 03:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.