The question is answered, right answer was accepted
Is there a way to enable/disable a rigidbody?
I've noticed (Unity 5.5) that I can't enable disable a rigidbody. I want to disable and reenable a rigidbody via script, is there a way to do this?
Answer by MeronSoda · Mar 15, 2017 at 04:17 PM
Have you tried setting it to Kinematic?
Rigidbody _rb;
void Awake ()
{
_rb = GetComponent<Rigidbody>();
}
// (...)
_rb.isKinematic = true; // Deactivated
_rb.isKinematic = false; // Activated
How would you do that with multiple? There's got to be a better way than copy paste it, add a number and drag all the objects into place.
You would use GetComponents<>()
ins$$anonymous$$d and iterate over the array that returns.
Follow this Question
Related Questions
how disable/enable rigidbody and box collider 1 Answer
Having a OnTriggerEnter make another gameobject Add Force in UnityScript. 1 Answer
How to enable and disable a script on an game object by pressing a keyboard button? 1 Answer
How to set rigidbody velocity and angularVelocity to Vector3.zero over time? 1 Answer
Rigidbody sleep disable 0 Answers