-
Notifications
You must be signed in to change notification settings - Fork 313
Jumping feels very different to Minecraft #243
Comments
Working on it it might take awhile ;) |
The problem seems to be that the player just accelerates to terminal velocity way too fast. That's probably an AccelerationDueToGravity issue, but I can't find the relative variable that would have any effect on it. |
The physics engine is buggy as fuck. It's difficult to build a clean-room physics engine that behaves exactly like Minecraft - reverse engineering friends have mentioned that Minecraft's own physics engine is really poorly implemented and difficult to precisely describe. Currently the best attempts are on the wiki:
I encourage anyone to take a whack at improving it. There are also less cosemetic (and possibly easier to solve) issues to tackle, like figuring out why non-player entities (sand, mobs, items) have a tendency to fall through the ground. Take a look at the unit tests if you want to look into these issues, they're a good tool for creating reproducable scenarios to test with. |
I messed around a little with the value in TrueCraft.Client/MultiPlayerClient.cs a bit. Changing the Gravity acceleration and drag made things a lot more like vanilla MC. However, doing that means the player can jump 2 blocks high instead of one. Trying to figure out why that is. Is there a maxJumpHeight somewhere, or something that would help determine what is going on there? |
Those values are straight from Minecraft, changing them wouldn't fix the real bug. The bugs are in the physics simulation, not the constant. |
Temporary fix?: Setup an spigot server and use a plugin to record the height value of your player, and make a curve graph based on the data. You could add velocity based on the curve (interpolate) |
Should be possible even without a plugin.
|
Simulating some other motion curve isn't going to cut it. It's not designed that way. We give the player positive vertical velocity and let the physics engine do the rest. |
In TrueCraft, jumping is enough to step over blocks, but the total air time is very low compared to Minecraft. This is probably due to the gravity being too high. It feels like you're bumping, more than jumping.
The text was updated successfully, but these errors were encountered: