+1 vote

Hi, I have situation like on this picture:

enter image description here
This white "walls" are moving down using set_pos(). All of them are generated from script with correct KinematicBody2D and CollisionPolygon2D. Similar situation is with that arrow on the bottom (but it can move only left and right). How can I detect collision?

getnode("arrow").iscolliding() giving me back "false".

in Engine by (227 points)

1 Answer

0 votes
Best answer

I think is sounds like you are trying to push two physics objects through each other. You might want to adjust the moving walls physics layer/mask to ignore collision with the floor, but not with the player.

also, if you want to use iscolliding(), it needs to be in a func _fixedprocess().

Some resources that might make things clearer:
(video version: https://youtu.be/QQ3y9YU_QAo)

by (546 points)
selected by

Thanks for help :)

Finally i have created 2D area with signal "area_enter" and it's works fine.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.