Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ismaelgame7 | |
Old Version | Published before Godot 3 was released. |
Hello peoples,
I do not know what I’m doing wrong when checking collisions with kinematicbord2d!
The collision only works on the top of the enemy and not on the sides.
I put the CollisionShape 2D right and put this code at the enemy:
if (is_colliding()):
var colliding = get_collider()
if colliding.is_in_group("hero"):
print("colliding")
pass
But nothing works
When the enemy leans on the hero on the sides nothing happens, but when I jump and stay on top of the enemy, the prints happen.
Is this a bug? someone help me please?!
The collision checking methods on KinematicBodys only operate on collisions that happen after a call to move. You need to post the rest of your enemy code because it’s impossible to tell what you are doing wrong from just this snippet.
raymoo | 2017-07-09 16:55
Also add some information on the scenes structure.
eons | 2017-07-09 23:24