How to get the body's travel direction? Should I track it manually?

Hi,

Is there a way for me to get the travel direction of a body? the idea is i want to create a bumper effect when the something hits something. So it’s not just bounce/defelction but i want to apply force to the bounce direction to give that effect.

So far I managed to find that :

  • event.force is no longer available in the collision event (is there a way to get this)

  • no docs saying about how to get the bounce direction

Halp?

Thanks

http://docs.coronalabs.com/daily/api/type/Body/getLinearVelocity.html

Put a sensor object around the solid object you want to use as a bumper. When the travelling object comes into contact with the sensor begin applying a small amount of force in the opposite direction of travel.

http://docs.coronalabs.com/daily/api/type/Body/applyLinearImpulse.html

http://docs.coronalabs.com/daily/api/type/Body/getLinearVelocity.html

Put a sensor object around the solid object you want to use as a bumper. When the travelling object comes into contact with the sensor begin applying a small amount of force in the opposite direction of travel.

http://docs.coronalabs.com/daily/api/type/Body/applyLinearImpulse.html