Get relative position in the scene

Software: Away3D 3.x

Hector, Sr. Member
Posted: 06 June 2012 09:19 PM   Total Posts: 137

Hi all,

Maybe it’s a silly question:

I have a object inside a container. This container is moved and rotated in the scene. How do I get the position where the object is in the scene?

Thanks

   

Richard Olsson, Administrator
Posted: 16 June 2012 12:14 PM   Total Posts: 1192   [ # 1 ]

Since you’re only after the position, it should be as simple as this:

var pos : Vector3D = myChildObject.sceneTransform.position;

If you care about rotation and scale, it gets a little more complicated, but the basic principle is still the same: the sceneTransform property is a matrix representing your object’s transformation in scene space.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X