Hi,
I am looking for help to create a simple “character controller”.
Goal :
- while keyPress / character move foward / see “walk animation”
- without a character controller component, just using rigidbody and forces, like if the character was , a car.
–
my old workflow (with character controller component) :
- a 3D model,with detailled colliders for bodyparts (from the software Character Creator for instance)
- CharacterController component
- AnimatorComponent, (no motion root) with a state machine :
IDLE → loop idle animation
WALK ->loop walk animation - script : if keyPress … state = WALK … controller.Move() … else state = IDLE
Result : Everything works fine, and is “nice”
–
I want to go further and get rid of charcterController, do the exact same things but with physics controller instead.
new workflow (rigidbody attempt):
- the same context (animator that permantly loop between idle or walk)
- rigid body component
- script “if key press rb.AddForce(new Vector3(0,0, thrust), ForceMode.Impulse);”
Result : red alert general failure
- adding rigidboby and check “gravity” make the character fall forward in T-pose.
- activate the animator component: the character go crazy and run out of control
- change the “gravity center” , the character start to dance on his head after a few seconds
The “use gravity” is the trigger of the mess, but i hope i dont have to simulate and “compute all body muscle force to make the character stand still” ?
I didnt find a clear tutorial how to set up everything correctly.
All i wanna do : “on keypress, move forward, and see walk animation” … like the character controller version
thanks for help