Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add collision priority property to TileSet physics layers #98773

Merged

Conversation

KeyboardDanni
Copy link
Contributor

Fixes #98772.

This adds a collision_priority property to TileSet physics layers. This allows you to make the resulting collision bodies produced by the TileMap have a higher collision priority (for example, 96.0), meaning the depenetration phase is much less likely to move an object into a wall if it's inside another object that suddenly becomes solid.

Demo of before and after:
TilesetCollisionPriorityDemo.zip

@KeyboardDanni
Copy link
Contributor Author

Video:

TilemapCollisionPriority.mp4

@rburing
Copy link
Member

rburing commented Nov 3, 2024

This looks fine from the physics perspective. The typical use case is increasing collision priority on a floor or a wall, and most likely you want to do this for all floors and all walls (of a given type), so it makes sense to have this property on the TileSet level.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Nov 5, 2024
@Repiteo Repiteo merged commit 4f41637 into godotengine:master Nov 10, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 10, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TileSet physics layer doesn't have collision priority property
6 participants