0 votes

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 ?

Godot version 3.2.1
in Engine by (68 points)

3 Answers

+1 vote
Best answer

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

by (221 points)
selected by
0 votes

You could use a CollisionShape2D's one_way_collision property.

by (365 points)
0 votes

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.

by (401 points)
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.