Rigidbody gravity not working.
I am not seeing anything current or presenting any proper solution.
If you have a rigid body on a character and it goes over an edge, with gravity checked, it should fall and react the same way as any object with said "rigidbody". It does not.
It does not work either with creating scripts to allow character to use the step up and slope features that you can get with Character Controller.
But then the Character Controller does not have the physics needed either and there is no "tutorials" how to get the physics elements with the Character Controller, working, and there are no tutorials to get the rigidbody setup with capsule or whatever collider, gravity and step detection working.
I have used several diverse movement type scripts, including for animated humanoid and static state objects. I need something that is current that demonstrates this properly because it appears that after 4.6 all the "Character" options be they first or third person have become fundamentally garbage.
Answer by Cepheid · Jan 24, 2016 at 12:28 PM
@Arch_Warlock
Are you sure that your gravity settings are correctly set and that the Rigidbody does not have isKinematic checked? Without a screenshot or script snippet it's rather hard to diagnose the problem. Furthermore, if you wish to detect collisions and act upon other Rigidbody's with a character controller a quick search of the scripting API brings this up:
Using this you can detect a collision with other Rigidbody's and enact a faked force for your character or use AddForce() on the Rigidbodies which collided with you based upon this.
As for the rest, I assume you are asking for a fully fledged or slightly better character movement script. In which case I can only but point you in the direction of YouTube, GitHub and the various other blog/tutorial sites which offer free and clearly commented character movement scripts.
Some cases in point:
Character Controller in 20 Minutes - Renaissance Coders
Advanced Character Controller Template - C Sharp Accent Tutorials
Rigidbody FPSWalker - UnifyCommunity
I hope this helps in some way.
Answer by TjazS · Nov 08, 2020 at 02:37 PM
I just added a collider to the gameObject (with rigidbody) and now it works.
Your answer
![](https://koobas.hobune.stream/wayback/20220612061455im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Character stuck moving on spot. 1 Answer
AR how to move a character in the real world - environment rendering? 0 Answers
Script problems c# 0 Answers