+2 votes

I have a TileMap and on top of it a StaticBody2D (Slippery) such that the top surface of both exactly overlap like this:

enter image description here

with the friction on the StaticBody2D set to 0 and friction of Tilemap set to 1

so How do I set the priority of the StaticBody2D higher than that of the TileMap such that any body on top of them only interacts with StaticBody2D but not Tilemap?

"why not just place StaticBody2D above TileMap?"

If I do that then it causes an elevated bump which stops any body from horizontally entering StaticBody2D

"why not hollow out that portion of the TileMap and place StaticBody2D in it?"

The StaticBody2D is generated during runtime and hence the player decides where it is placed making it difficult to modify the tilemap

Godot version 3.5
in Engine by (99 points)

I couldn't find a solution related to collision priority. But I recreated your scenario and added an Area2D as a child of the StaticBody2D, which changes the friction of the body above it... Would you like me to post a complete answer about this?

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 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.