Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | i dont like |
here is the jump function, i think its all of the relevant code:
if Input.is_action_pressed("jump") and is_on_floor():
vel.y = jumpforce
so what it should do is every time _physics_process(delta): runs is it checks if the “jump” key is down, and then checks if it is touching the floor. it only jumps when the jump key is down, and is_on_floor() is false when the player is midair, but the issue is whenever i touch a staticbody, which makes up my floors walls and ceilings, the player is able to jump
is there a better way of doing some part of this
I can understand the issue with floors and the is_on_floor()
method. But this happens with walls and ceilings, too? I thought KinematicBody
was designed to detect floors, walls, and ceilings separately. I don’t understand how your character is mixing up the ceiling with the floor.
Ertain | 2022-08-15 03:53
am i perhaps setting up my floor and wall nodes the wrong way?
i dont like | 2022-08-15 08:24