0

I'm currently writing a small game with box2dweb and I need some direction for this: I'm throwing a Box or Ball and have to hit a specific place and trigger an event when the object that's been thrown isn't moving anymore, "fell asleep" so to say.

What's the proper way / best practice for this?

nocksock
  • 5,369
  • 6
  • 38
  • 63

1 Answers1

2

You could check it's velocity to see if it's moving anymore. Just call GetVelocity() on the body. I believe it returns a b2vec.

Seth Davis
  • 71
  • 3