Get grab and drag a rigid body

Software: Away3D 4.x

sk, Newbie
Posted: 11 April 2013 01:27 PM   Total Posts: 8

How can I grab and drag a rigid body, I would like it to stay at the mouse position until I release the mouse button?

Thanks

   

hfeist, Jr. Member
Posted: 23 June 2013 01:00 AM   Total Posts: 37   [ # 1 ]

I’m wondering the same thing. Have you found a way yet?

   

Yang Li, Administrator
Posted: 23 June 2013 04:46 AM   Total Posts: 80   [ # 2 ]

you can add a constraining force to the rigidbody when mouse pressed,

rigidbody.applyCentralForce(1000*(rigidbody.position - mousePosition));

   

AngelaAtkinson, Newbie
Posted: 31 July 2013 12:45 PM   Total Posts: 1   [ # 3 ]

What if there is a need to maintain the rigidness even after the mouse button release event? It seems the problem is small enough, but the exact solution is a little bit hard to find. Writing Tutor

   

John Brookes, Moderator
Posted: 31 July 2013 01:58 PM   Total Posts: 732   [ # 4 ]

You can also do picking like the example I posted here.
http://away3d.com/forum/viewthread/4396/

   

Alan Naylor, Newbie
Posted: 10 September 2013 03:13 AM   Total Posts: 1   [ # 5 ]

I’ve got some issues with the DragRigidbody.js script that was imported with Standard Assets. The problem is, I can only grab an object if I am really really close, and it does not always rotate with the camera. Is there any way I could fix it? Or can I use any other way to grab the objects?

broken ipad billings

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X