- Home /
Rigidbody not working
I'm having a bit of trouble with rigidbodies. I have attached them to my prefabs yet they won't work. The objects don't fall in space and collisions are not detected.
Is this something to do with it being a prefab? I am using prefabs so I can instantiate multiple copies of it at once
No, it's nothing to do with the prefab. That doesn't change anything about the way the object behaves, only the way it is created in the scene. $$anonymous$$ake sure the object has a collider as well, and that the rigidbody isn't set to 'is$$anonymous$$inematic'.
The object has a mesh collider, rigidbody doesn't have is$$anonymous$$inematic ticked :) Can anybody else help?
Just confir$$anonymous$$g, you're instantiating them at runtime, right? Do the objects work properly when you set them up in the scene, before you turn them into prefabs?
$$anonymous$$ake sure that you change Time.fixedDeltaTime so that it stays at the correct proportion. So, if you set Time.timeScale = 0.2, make Time.fixedDeltaTime = 0.004, so that Physics still happens.
Oh, I should mention that if you set Time.timeScale to 0, you won't be able to get Physics to run at all. Sorry.