- Home /
Question by
vaikartana · Mar 11, 2021 at 05:36 PM ·
controller2d character
Help Player Jump Script 2d
My player is not jumping when i press space and also nothing appears in console window Please Help
void FixedUpdate() { if (Input.GetKey(KeyCode.Space) && Mathf.Abs(_rigidbody.velocity.y) > 0.001f) { _rigidbody.velocity = Vector2.up * jumpforce; Debug.Log("Jump");
}
if (Input.GetKeyDown("space"))
{
Debug.Log("Jump");
}
}
},
Comment
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to make a character only moves in one way? 1 Answer
MMD How to export model and animations to Unity as 3rd person controller? 2 Answers
Orbit Script V2 Walking Problem 0 Answers
OnControllerColliderHit works on 2 character controllers 0 Answers