I hate the title of this post but can’t think of what else to put it. Basically I am doing a simple jump:
the jump key is down then:
forceY = jumpSpeed;
at the end of the update to see if they are pressing left or right on the keypad also I do this:
rigidbody2D.AddForce (new Vector2 (forceX, forceY));
This works well, but the player jumps up and falls down but it feels “slow” or floaty, i know this is a thing with 2d platformers using physics engines. Is there any tweaks i can do to make it feel tight?
Gravity scale change briefly while he is jumping? or any other tricks I just am unaware of?
(the jumpSpeed i use is 300, this lets the player jump one single block worth high)
might relate to the scale of the object vs coordinate system… or the speed of gravity?
Well the gravity scale is set to 1. If i set it high it falls better but then it really wonks up the rest of my code (things like checking max speed to see if the player splats after falling a while, now with grav scale three its like 1 inch and they splat) etc etc… also makes the horizontal movement odd.
You pretty much have to expect that no matter what approach you take. If you want less floaty, then the player needs to accelerate faster which means anything that depends on that will need to be adjusted. Also, I would probably adjust the global gravity setting instead of the gravity scale of an individual object. You might want to try using Impulse force mode for the jump, although I’m not sure how much difference it will make in your case.
Went with impulse, good idea. I am probably smoking crack, but it feels less floaty. Though probably isn’t
1 Like
Sometimes things “feel” better even though they may look nearly the same. I just rotated one spine bone 2 radians and it feels totally better than it did before. Comparing 2 animation previews visually it looks the same.
1 Like
Another option is to increase timeScale. Everything will be faster. Usually real physics is a bit slow for these kind of games.
1 Like
@Tomer-Barkan_1 that is an interesting idea, I think I am to far in to attempt that lord knows how much else I would have to change.