0 votes

Is it possible to remove some part of collision if it's behind a tilemap wall with collision?

Godot version 3.3.3
in Engine by (18 points)

not sure what you want to do exactly, but you can shrink the collider in code when a collision happens,
if you're using a kinematicBody2d for example check collision by calling get_slide_count after move_and_slide to get how many objects you collided with and then in a loop check for get_slide_collision, this should get you information about all bodies you collided with plus aditional info like position which you can use to determin the exact point of collision and shrink the collision shape accordingly

check out: get_slide_count and KinematicCollision2D in the docs

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.