how do you ignore a collision

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By szccornish

i have a stairs that my player will go slope up and down. but when i need to go to the other side, the collision block the way. how can i ignore the collision it for sometimes, so i can go to the other side ?

:bust_in_silhouette: Reply From: dancaer69

Maybe you can use “$CollisionShape2D.disabled = true” in some condition to disable the collision shape temporary and then enable it again.

:bust_in_silhouette: Reply From: Jayman2000

You could use a CollisionShape2D’s one_way_collision property.

:bust_in_silhouette: Reply From: IHate

Using tilemaps or groups You could have 2 collision maps or 2 collision groups depending on the player’s floor. The trigger to change from one collision map to another would be on the stairs start and end.