- Home /
Question by
Fewpwew130 · Jun 28, 2015 at 07:15 AM ·
charactercontrollergravity
disable gravity on Character Controller
Hello, I've tried to find an answer and looked through various Unity.Questions related to this issue, but still unsuccessfully.
I would like to make a Player float up and down if a button is pressed. For that purpose I would like to disable Character Controller gravity, but keep the rest of the code. What was suggested in previous answers: was to use Move instead of SimpleMove. But how can it be done, since Character Controller script is locked for editing?
Thank you very much!
Comment
Answer by Hexer · Jun 28, 2015 at 10:58 AM
If the Object has a Rigidbody, simply put the gravity scale to 0.
Thank you. There is no Rigidbody, but Character Controller is still affected by gravity. Is there another way?