Question by
wakedisposition · Nov 13, 2018 at 09:12 PM ·
movementunity 2djump
Character keeps flying after jumping
Heres how the i added it to move, the movement integer is the rigidbodycomponent.velocity in fixed update. It jumps once but then it never comes back on ground why?
movement.x =
speed.x * inputX;
if (onground)
{
float inputY = Input.GetAxis("Vertical");
movement.y = speed.y * inputY;
}
Debug.Log(onground);
}
void OnTriggerEnter2D()
{
onground = true;
}
void OnTriggerExit2D()
{
onground = false;
}
Comment
Your answer
Follow this Question
Related Questions
Problem with Jump script 1 Answer
Cant Move towards Right and Jump at same time? 2 Answers
Jump buffering and Coyote time causes double jump when spamming jump 2 Answers
While (starting jumping or in jump) holding W key makes game object jump high and fall slow. 1 Answer
How to create an object that mirrors players movements? 0 Answers