For example, in Angry Birds, when the birds stops bouncing or rolling, the next turn is initiated. How can we check physics bodies to see if they are at rest or about to come to rest? Is body.isAwake the thing to use here or is there a better way? [import]uid: 52127 topic_id: 12309 reply_id: 312309[/import]
The thing with Angry Birds is that the level doesn’t necessarily come to an end when the bird is completely stopped - just, extremely slow movement.
To do this I would check the linear velocity of your character over time. Check is once every X frames, and if the speed over those X frames is all within a certain limit (say, 0.5 for very slow) he has “stopped”. [import]uid: 7366 topic_id: 12309 reply_id: 44813[/import]