My game is made of a moving character and inanimate objects which it can collide with. Therefore, I have added a sphere collider to all objects (including the character), and a rigid-body only to my character. Add to that the fact that the character has 2 scripts, one for controlling it’s position through a script, and one to detect any collisions (the collider has IsTrigger enabled).
Now everything works fine 3 times out of 4, but sometimes, my rigid-body goes into sleep, and even if I call WakeUp it seems to stay asleep for a few seconds before kicking back in.
I have tried settings the sleepVelocity and sleepAngularVelocity values to very high and low values to no avail.
Now my question is this: did I do something wrong? Is it ok to have only one rigid-body and then colliders (the documentation seems to say so)? Why is the system going to sleep like this? Why is my WakeUp not having any effect?
PS: The behaviour seems to be worse when run on the iPhone. The engine probably send ths physics of the rigidbody to sleep more often…