Question by
mojoplayshd36 · Feb 09, 2020 at 06:55 AM ·
charactercontrollerrun
Made a run script but if i press shift the run doesn't end .
public float walkspeed;
public float runspeed;
public float speed;
void Update()
{
if (Input.GetKeyDown(KeyCode.LeftShift))
{
speed = runSpeed;
}
if (Input.GetKeyUp(KeyCode.LeftShift))
{
speed = walkSpeed;
}
}
Comment
Your answer
Follow this Question
Related Questions
Problem with the Character Controller on the Y-Axis,Character Controller drifting in the Y Axis 0 Answers
Character Controller Move function Explanation 0 Answers
Flying character rigidbody - can't see any static collider 1 Answer
Problem with crouching 1 Answer
Unity Remote 5 not working with UI joystick or buttons 0 Answers