Drag3D inside ObjectContainer3D

Software: Away3D 3.x

Hector, Sr. Member
Posted: 20 April 2012 08:54 AM   Total Posts: 137

Hi All,

I have an ObjectContainer3D which contains some objects. The object container position is not in the center of the scene.
When I use drag3D to drag one of the objects, they are misplaced because their position is related to the scene.

Eg: If container position is x=100 and z=100 in the scene, when dragging an object it goes to x=100, z=100 inside the object container, which means it’s in x=200, z=200 in relation to the scene.

Am I missing some offset option in drag3D?

Thanks smile

   

Avatar
Fabrice Closier, Administrator
Posted: 20 April 2012 09:15 AM   Total Posts: 1265   [ # 1 ]

you can do 2 things : replace the object3d properties in class where it says object3d.x by object3d.scenePosition.x
(thats something I’ll fix in near future)
or add eventListeners to the class and add the parent position.

   

Hector, Sr. Member
Posted: 20 April 2012 12:59 PM   Total Posts: 137   [ # 2 ]

Thanks Fabrice! I will try something like that :D

   

GameDesigner, Jr. Member
Posted: 28 April 2012 12:26 PM   Total Posts: 33   [ # 3 ]
Hector - 20 April 2012 12:59 PM

Thanks Fabrice! I will try something like that :D

Any News?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X