Hello! I can’t figure out what the problem is, the character just refuses to jump. The code is in the photo, I will be glad to everyone who tells me what the problem is! Thank you!
Hello, assuming that
_jump() is executed every frame and the script is on an object that also has a rigidbody that isn’t kinematic, then it should actually work.
Try checking your query from the outside in with Debug.Log to see where the code is going.
What can still be is that the mass of the gameObject is too large. AddForce without a ForceMode parameter is mass dependent by default.
Or, what often happens is that you overwrite the rigidbody velocity again somewhere later in your code in the same frame, for example when assigning a movement.
If none of that helps, then you would have to send us the complete script so that we can help you.