ioxu / key

Key, a game made with the Godot Engine 4.
MIT License
6 stars 1 forks source link

jump needs improvement #53

Closed ioxu closed 1 year ago

ioxu commented 1 year ago

I think broke jump while fixing #50 Log prints jump when jump action is pressed.

The actual jump works when the character us up against a small edge, for some reason.

ioxu commented 1 year ago

Still weird.

Something going on between the logic for valid conditions for jumping being spread across _process and _physics_process.

ioxu commented 1 year ago

improvement: all logic is in _physics_process now. Occasionally jump doesn't work: jump is fired, vertical impulse is applied to velocity but I think the body is a little bit too far underground or something.

ioxu commented 1 year ago

putting gravity while not on floor back in:

    # gravity
    if not player.is_on_floor():
        current_vertical_speed.y += gravity * dt * jump_acceleration

.. at least this fixes the standing-still-jitters.

ioxu commented 1 year ago

I think it's better, going to close until it's bad again.