Question about position in space of an object
-
I've been looking but couldn't find any method that can supply you with this information. If I add an object to my space, for example an object from the 3d warehouse, and I need to know its position in 3d space (ie, its coordinates (x, y, z) ), is there a method that does this for me? How can I do this?
I can't imagine there not being such a function. If I move an object to say (100, 200, 300) through the ruby console, that coordinate I assume should be somewhere present in the object's information. If anyone can help me I'd really appreciate it.
-
This is obtained through the object's transformation.
-
Could you be a little bit more precise? I've looked in the transformation class, and see a method that returns the x-axis, y-axis and z-axis vector. I am just looking to get a certain entitie's coordinate. A function that returns it's 3d position.
-
See if transformation.origin returns the result you are expecting.
-
Bender,
For coordinates, you can use Jim's Query Tool (QueryToolbar.rb).
Search for QueryToolbar.zip !Cornel
-
thanks! That seems to be what I need.
Bender
Advertisement