Recently in my ongoing project, I noted that for whatever reason, bodies I create are flagged as 'awake' right off the bat, and remain so until they are interacted with in a collision with some other body. This includes static bodies with no mass and no capacity for movement.
For example, if I create a falling box object a few metres above a stationary floor object, they both start off as awake. This makes sense for the box, since it is falling through the air, but makes less sense for the completely immobile floor. What makes even less sense is that the floor will not go to sleep until after the collision with the box. So if, for example, the box misses the floor, falls off the screen and is deleted, the floor object is still sitting perfectly still but awake.
Is this intended behaviour? Or am I doing something oddly in terms of my body creation? I have been following the tutorials at http://www.kerp.net/box2d/index.php, and creating my bodies and actors in a nearly identical manner.
For example, if I create a falling box object a few metres above a stationary floor object, they both start off as awake. This makes sense for the box, since it is falling through the air, but makes less sense for the completely immobile floor. What makes even less sense is that the floor will not go to sleep until after the collision with the box. So if, for example, the box misses the floor, falls off the screen and is deleted, the floor object is still sitting perfectly still but awake.
Is this intended behaviour? Or am I doing something oddly in terms of my body creation? I have been following the tutorials at http://www.kerp.net/box2d/index.php, and creating my bodies and actors in a nearly identical manner.