how to use Grid class snapping

Software: Away3D 4.x

Alba, Newbie
Posted: 19 July 2012 03:42 PM   Total Posts: 2

Thanks your GoldReleased version.
First I need to say that I’m newbie person for Away3D 4.0x version.
When I was looking Away3D classes from github I found this Grid class under this package away3d.tools.utils.

So my question is how can we use this class snapping in any mesh when we drag and drop any object3D in any Plane XY or etc.Becuse I guess(I’m not for sure) there is no example or tutorial how to use this class in a simple real world application.

Finally please add more (and more) example and tutorial how to use this amazing 3D open source engine with flash3D tech.Because I think your tutorials is not enough for whom like me (and newbie persons) to understand only from documentation and examples.

Best regards.

   

Richard Olsson, Administrator
Posted: 19 July 2012 04:41 PM   Total Posts: 1192   [ # 1 ]

You should probably look into the Drag3D class if you want to drag objects around. The basic principle is that you give it an object to move around, and a plane on which it should be allowed to move, and then you invoke updateDrag() every frame.

Then if you want to snap the object, just invoke Grid.snapObject() on the object after you’ve updated the Drag3D instance every frame.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X