- Home /
gravity doesnt seem to effect my first person controller....help!
hey guys im fairly new to this and need help.. iv got my gravity working on rigid objects (ie everything but my controller) but just cant seem to make it affect me...
also if anyone has a jump script (to make my controller jump) it would be awesome!
Thanks Bowen
Answer by Ostagar · Nov 08, 2010 at 12:17 AM
From the Unity documentation:
"CharacterController allows you to easily do movement constrained by collisions without having to deal with a rigidbody. A CharacterController is not affected by forces and will only move when you call the Move funtion. It will then carry out the movement but be constrained by collisions."
If you're using the Standard Assets / Character Controllers / First Person Controller prefab, it should've come with a Character Motor (Script) component. Two of the benefits of that script are that it handles gravity and jumping. You can modify its properties in the Unity inspector to tell it how strong you want gravity to be and how high you want your character to jump.
Alternatively, if you want your character fully subjected to physics, consider using a RigidBody instead of a CharacterController, although that's usually not the effect you want.
Did you try playing with the "Gravity" property I mentioned?
Your answer
Follow this Question
Related Questions
The faster it goes, the longer it jumps 1 Answer
How do you modify gravity force in this script ? 1 Answer
The faster my character goes the longer he jumps. 1 Answer
Edit this script so that on the second jump change the gravity to 5 2 Answers
How to make a object jump constantly at y and move to the next position to z (perfectly) 0 Answers