The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

I'm trying to make a dash that also disables collisions with walls, so you go through them. In the tileset I've made, the walls are on the wall layer (int 0 in collision_layer), and the ground is on int 1. The player is on both layers.
When the dash is activated, int 0 is set to false, so the player goes through the walls, which works as intended. However, the player also goes through the floor, which is a huge issue.

I've already made sure that int 1 also isn't being disabled. Why does the player still go through it? Help is appreciated.

Godot version 3.2.3
in Engine by (105 points)

Nevermind, turns out the tilemap's collisions override the collisions I've already set. Is there any way I can avoid using two separate tile sets?

1 Answer

+1 vote
Best answer

Put the floor and the wall on different layers. Say, wall on 0 and floor on 1. Set the player mask to 0 and 1. When you want to dash through walls, disable the player mask on 0. If you want to hit walls again, reenable 0.

Hope that helps.

by (2,159 points)
selected by
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.