- Home /
Mesh collider not colliding with ball properly
Ok, so I'm making a game in which the player has to tilt a maze to guide a ball through it. I've made several different models of mazes in Sketchup, and have got a functional script to control the tilt of the maze, but the ball isn't rolling along the board correctly...
The ball is basically just a sphere with a rigidbody, the board's movement is controlled by a script, and it also has a rigidbody (kinematic) attached to it.
Whenever I tilt the maze, the ball starts rolling for a moment and then just stops, mid-board, without actually hitting anything...
Why is it doing this? Do I need to add something extra to my colliders?
Answer by smallbit · Oct 28, 2013 at 07:07 PM
I had the same problem and found the answer here on forums. What happens here is that rigid body is entering to sleeping state when not moving. To solve this add a simple script to your ball to wake it up:
void Update () {
if (rigidbody.IsSleeping())
{
print("Wake up");
rigidbody.WakeUp();
}
I am finishing similar game now if you have any general problems with physics let me know I might be able to help
Your answer
Follow this Question
Related Questions
Anyway to make my object not fall through the floor without convex? 0 Answers
Mesh Collider STOPPING Objects Instead of Detecting Collision 1 Answer
Problems with collisions while rotating a rigidbody 1 Answer
Colliding problems. 1 Answer
OnCollisionEnter doesn't work if enemies and allies have rigidbody ? 1 Answer