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

ScreenElements do not tolerate 0 width and 0 height sizes #2601

Closed
eonarheim opened this issue Mar 11, 2023 · 1 comment
Closed

ScreenElements do not tolerate 0 width and 0 height sizes #2601

eonarheim opened this issue Mar 11, 2023 · 1 comment

Comments

@eonarheim
Copy link
Member

Steps to Reproduce

Create a ScreenElement without specifying a height or width

 let test = new ScreenElement()
 this.add(test)

Expected Result

This should create without issue.

Actual Result

Error is produced

Excalibur only supports convex polygon colliders and will not behave properly.Call PolygonCollider.triangulate() to build a new collider composed of smaller convex triangles

Environment

  • browsers and versions: Chrome
  • operating system: Windows
  • Excalibur versions: latest main
  • (anything else that may be relevant)

Current Workaround

Specify a non-zero width and height, then optionally remove the ColliderComponent if it's not desired or set it to ex.ColisionType.PreventCollision

@eonarheim
Copy link
Member Author

Closed in #2602

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