I want to make an object fly which has ridged body physics by disabling its gravity after pressing a key. So I just want to know how to disable gravity through C# script. I already went through google search but I didn’t get what I want. I even tried this link http://docs.unity3d.com/ScriptReference/Rigidbody-useGravity.html
You need to do something like this. its simple
You can change KeyCode.W into according to your requirement |
|||||
|
other.attachedRigidbody.useGravity = false;
- Is it that hard to read? – Ethan Bierlein May 26 '16 at 17:11