pigdevstudio / platform_template

Template project for platform games in Godot Engine.
MIT License
72 stars 12 forks source link

Player able to jump in air for some time after wall jump #25

Closed Zerokami closed 6 years ago

Zerokami commented 6 years ago

This is happening in the platformer template. You are able to jump in air for some reason. Once you wall jump. And keep pressing in that direction. The state that checks if wall jumping is stuck or something. image

Zerokami commented 6 years ago

@henriiquecampos Kinda fixed the problem

Replaced else with an elif actor.is_on_wall()

func input_process(actor, event):
    if event.is_action_pressed(actor.jump):
        if Input.is_action_pressed(actor.dash):
            actor.velocity.x = (wall_jump * normal.x)
            actor.velocity.y = -wall_jump * dash_jump_multiplier
            actor.emit_signal("perform_action", "jump")
        elif actor.is_on_wall():
                actor.velocity.x = wall_jump * normal.x
                actor.velocity.y = -wall_jump
                actor.emit_signal("perform_action", "jump")
henriiquecampos commented 6 years ago

Awesome! Thanks for the help :blue_heart: so this is fixed now, right? I'm closing this issue then! :tada: