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

Box2D implementation doesn't use tile collision shapes? #272

Open
dwexel opened this issue Aug 9, 2022 · 1 comment
Open

Box2D implementation doesn't use tile collision shapes? #272

dwexel opened this issue Aug 9, 2022 · 1 comment

Comments

@dwexel
Copy link

dwexel commented Aug 9, 2022

I'm wondering if there's any way to get the box2d physics implementation to respect the tile collision shapes set in the Tiled editor. It seems like it only takes the entire tile as a square object.
Screenshot 2022-08-09 131837
For example, here in the editor you can see I've set shapes for the tiles,
Screenshot 2022-08-09 131741
But in-game, the physics objects bounce off of invisible walls.
Here are my project files:
lowrez-example.zip
thank you, to anyone who may look.

@dwexel
Copy link
Author

dwexel commented Sep 7, 2022

It normally seems as if it wouldn't be possible to do this, as STI "doesn't support tile collections."

But, you could implement tile collision shapes if you exported the tileset file from Tiled, separately and in addition to the map file, and used the tile collision info from there.

I'll update if I do more!

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

No branches or pull requests

1 participant