#Character Controller Tutorial

1 messages · Page 1 of 1 (latest)

fading salmon
#

thread here

primal rapids
#

okay 🙂 thanks

fading salmon
#

I'm looking it over

#

do you have any errors in the Unity Editor?

primal rapids
#

basically the ``` if (!myCharacterController.isGrounded || myspeedY < -10)
{
myspeedY += (mGravity * Time.deltaTime);
}
else
{
myspeedY = 0;
}

fading salmon
#

or Visual Studio

primal rapids
#

no 0 errors

fading salmon
#

|| myspeedY < -10
when is this in the tutorial?

primal rapids
#

it is more about the logic

#

that's something i am testing now

#

to force it

#

i removed the isGrounded and it works

#

but I am still above the ground without rigidbody so I don;'t know how to give the character gravit5y without the rigid body

fading salmon
#

well - take a minute to think about this
The character controller is scripting gravity
While Rigidbody uses the built-in Physics system, that does the calculations for you.

You are Not making a Rigidbody Controller right now

#

so if Rigidbody is what you want, you need a different tutorial

#

Anyway

#

post me your current code

#

Line 43

Vector3 mymoveDirection = new Vector3(Input.GetAxis("Horizontal"), 0.0f, Input.GetAxis("Vertical")).normalized;

You can use GetAxisRaw instead of normalizing the vector

primal rapids
#

Thank you, I ll try to read something about it and thinking it through I guess is fairly easy logic issue here ^^ but I am kind of sleepy. Tomorrow I ll reply here a solution :))