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

Warning when using RapierConvexPolygonShape with collinear points. #269

Closed
witchpiggie opened this issue Oct 6, 2024 · 9 comments · Fixed by #276 or #283
Closed

Warning when using RapierConvexPolygonShape with collinear points. #269

witchpiggie opened this issue Oct 6, 2024 · 9 comments · Fixed by #276 or #283
Labels
bug Something isn't working

Comments

@witchpiggie
Copy link

I get about 14 of these warning when starting my project.

W 0:00:01:0125 <godot_rapier::shapes::rapier_convex_polygon_shape::RapierConvexPolygonShape as godot_rapier::shapes::rapier_shape::IRapierShape>::set_data: ConvexPolygon shape points changed from size 6 to 4
<C++ Source> src\shapes\rapier_convex_polygon_shape.rs:118 @ <godot_rapier::shapes::rapier_convex_polygon_shape::RapierConvexPolygonShape as godot_rapier::shapes::rapier_shape::IRapierShape>::set_data()

They vary the size change like 6 to 4, 6 to 5, 5 to 4.

I don't have a minimal project sample, but I'm not sure if this is something about my project or not. The project is not super complex, it's early stages, so I'm not sure what might be causing it.

All I did was install and active Rapier2D as the physics engine. Then start my project.

Environment:

  • OS: Windows 10
  • Version 0.8.5
  • Godot Version 4.3
  • Type simd 2d
@witchpiggie witchpiggie added the bug Something isn't working label Oct 6, 2024
@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 6, 2024

Problem is from rapier reducing number of vertices in case of collinearity or other such things. Fix should be to remove those checks from rapier lib.

Issue on parry side: dimforge/parry#277

@Ughuuu Ughuuu changed the title Warnings when starting project Warning when using RapierConvexPolygonShape with collinear points. Oct 6, 2024
@witchpiggie
Copy link
Author

Okay. So, I should be safe to ignore these and they'll go away eventually?

@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 7, 2024

Nothing you can do about it. At some point it will get fixed in parry or ill make a fork that fixes it if they dont merge my fix.
In any case its a warning from godot-rapier that wants the points to be in a specific way and removes some of the points that it thinks are not needed. Ideally would be if it wouldnt do that.

@witchpiggie
Copy link
Author

Alright. Thanks for the info.

@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 13, 2024

Ok, make a fork of my own of rapier and parry(already had it, just wanted to merge it into mainstream rapier, maybe it might happen at some point), and that will fix this.

@witchpiggie
Copy link
Author

I'm still getting warnings:

src\shapes\rapier_convex_polygon_shape.rs:111 - ConvexPolygon shape points changed from size 6 to 4

@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 14, 2024

Uf, I maybe have merged it too quickly. I think I forgot to change it in godot-rapier, only updated parry. It will enter then in 0.8.8 release :D

@Ughuuu Ughuuu reopened this Oct 14, 2024
@Ughuuu
Copy link
Contributor

Ughuuu commented Oct 14, 2024

Man would have been really good if I had a reproductible project on this :| Next time if you open an issue put a zip file with a repro project.

@witchpiggie
Copy link
Author

Apologies. Unfortunately I'm experiencing this on a project I'm working on that's not small by any means.
If I get any more, I'll try to make one.

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
2 participants