Forums

OverviewV-Play 1 SupportCheck if entity has stopped moving › Reply To: Check if entity has stopped moving

OverviewV-Play 1 SupportCheck if entity has stopped moving › Reply To: Check if entity has stopped moving
#4557

Christian
V-Play Team

Hi Saims,

you could use the active property of BoxCollider to detect if a physics body is moving or not. You could disallow an entity getting inactive by setting the sleepingAllowed property to false, but by default it is true.

Another approach might be, to not only decrement your shotsInTheAir counter when the balls are colliding with the border, but also when they collide with the other physics objects where they can come to a halt. Or you start a timer after issuing the last shot and stop your game if either all balls are out of range, or the timer is finished whatever comes first.

Cheers, Chris

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support