Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | icqqq | |
Old Version | Published before Godot 3 was released. |
I am making a 3D platformer and I would like to ask
how can I implement a jump attack like Mario?
In Mario a enemy will get damage if Mario jump on top of it.
I am trying to use raycast and put it on my character foot, but since the raycast is only a straight line, it is not perfect.
I am using KinematicBody for both the character and enemy
So any ideas?
Thanks
you can use an area2D or check for the player’s position upon collision( aka if he is above the enemy or by its side )
rustyStriker | 2018-01-01 11:23
make 2 collision on enemy
- for left and right
- for top and down
like a plus sign
if the player touch 1. player die
if the player touch 2. enemy die
Pin | 2018-01-01 17:18
i think it will be more of a
- left, right and down
- top
rustyStriker | 2018-01-01 18:03