Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AquilaHeliaca | |
Old Version | Published before Godot 3 was released. |
Hi
I have another problem. I try to check if player collides with object above him. I try to use function get_collider() but variable object is still empty after calling this function. Besides debugger shows “Child Process Connected”. When get_collider is called, there is an error: “Condition !colliding is true. returned: 0”. Why it doesn’t working?
if is_colliding():
var normal = get_collision_normal()
var finalMov = normal.slide(movRemainder)
move(finalMov)
if normal == Vector2(0,1):
object = get_collider()
Ofc i declared object variable before and script extends KinematicBody2D. Function is_collide() works properly.