Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

2d jumping, addForce hitting a max height despite force strength

$
0
0
So I have a pretty rudimentary physics-based jumping system, mainly I use rigidbody2d.AddForce to add a force to the up direction. When I use a small value, it does essentially nothing, as the value is just too small to do much of anything. However, after a certain level of force, the height of the jump maxes out and will not go any higher, even if I set the force to a ridiculous value. The mass of the rididbody2d is set to 1. //check for jumping if (inputY == 1 && grounded) { rigidbody2D.AddForce(Vector3.up * 1000000000000); } that should be the only relevant code. The max point the gameobject reaches appears to be where his feet reach his head's initial position, and it happens instantly. Gravity does not reduce the object's velocity over any interval. Any thoughts/insights related to the subject are most welcome.

Viewing all articles
Browse latest Browse all 1264

Trending Articles