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

[Bug]: Polygon and Circles doesn't work collision #577

Open
juarezfranco opened this issue Jan 18, 2025 · 0 comments
Open

[Bug]: Polygon and Circles doesn't work collision #577

juarezfranco opened this issue Jan 18, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@juarezfranco
Copy link

juarezfranco commented Jan 18, 2025

What happened?

I am facing an issue with collision detection for objects created in Tiled. I have assigned the collision class to the objects. While rectangle objects work perfectly, circle and polygon objects do not trigger collisions as expected.

It is strange because the object is rendered with the collision color, indicating that the collision area is being detected. However, the player does not respect the boundaries of circle and polygon objects and moves through them as if no collision exists.

To reproduce this issue, I created a small example project that demonstrates the problem.
You can find the project at the following link:

https://github.com/juarezfranco/bonfire_test

Image

Tested platforms:

  • iOS
  • macOS

Environment:

Bonfire version: ^3.13.2
Flutter version:

Flutter 3.27.2 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision 68415ad1d9 (5 days ago) • 2025-01-13 10:22:03
-0800
Engine • revision e672b006cb
Tools • Dart 3.6.1 • DevTools 2.40.2

Steps to reproduce?

- Open the provided project: https://github.com/juarezfranco/bonfire_test
- Observe the collision behavior of rectangle objects (works as expected).
- Check the collision behavior of circle and polygon objects (not working).

What did you expect to happen?

I expect all objects assigned with the collision class, including circles and polygons, to correctly trigger collision detection. This behavior should be consistent across all object shapes, just like rectangles currently do.

Bonfire version

3.13.2

Relevant log output

@juarezfranco juarezfranco added the bug Something isn't working label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant