godot-rapier-2d icon indicating copy to clipboard operation
godot-rapier-2d copied to clipboard

Warning when using RapierConvexPolygonShape with collinear points.

Open witchpiggie opened this issue 1 year ago • 4 comments

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 avatar Oct 06 '24 07:10 witchpiggie

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: https://github.com/dimforge/parry/issues/277

Ughuuu avatar Oct 06 '24 07:10 Ughuuu

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

witchpiggie avatar Oct 07 '24 03:10 witchpiggie

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.

Ughuuu avatar Oct 07 '24 04:10 Ughuuu

Alright. Thanks for the info.

witchpiggie avatar Oct 07 '24 16:10 witchpiggie

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.

Ughuuu avatar Oct 13 '24 08:10 Ughuuu

I'm still getting warnings:

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

witchpiggie avatar Oct 14 '24 04:10 witchpiggie

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 avatar Oct 14 '24 08:10 Ughuuu

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.

Ughuuu avatar Oct 14 '24 15:10 Ughuuu

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.

witchpiggie avatar Oct 15 '24 22:10 witchpiggie