Stop moving an object after touching another

Software: Away3D 4.x

Hec, Newbie
Posted: 15 May 2014 05:47 PM   Total Posts: 20

Hi,
I have two objects, I would like to move one object and when it touch the other it stop moving without entering in the other.

I’m using collision to detect and stop the movement but the object is entering in the other by the distance of the increasement. If I put a force it will push it away but I need to stop exactly touching the other.

BODY1.addEventListener(AWPEvent.COLLISION_ADDEDCollision);

function 
Collision(event:AWPEvent):void 
{
dis
=0;
removeEventListener(Event.ENTER_FRAMEGMove);

 

   

Jillinger, Newbie
Posted: 30 June 2014 01:22 PM   Total Posts: 29   [ # 1 ]

I don’t know if this might help
http://away3d.com/forum/viewthread/5547/

   

Jillinger, Newbie
Posted: 30 June 2014 01:44 PM   Total Posts: 29   [ # 2 ]

Sorry I misled you. My post got lost somehow. Here it is: Examples.

   

Hec, Newbie
Posted: 30 June 2014 02:05 PM   Total Posts: 20   [ # 3 ]

No, I did a push function to set the object after the collision detect.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X