appsinacup / godot-rapier-physics

Godot Rapier Physics – 2D and 3D physics engine for the Godot game engine. with better stability, performance, liquids, determinism, state serialization and no ghost collisions.
https://godot.rapier.rs
MIT License
428 stars 22 forks source link

Warning when using RapierConvexPolygonShape with collinear points. #269

Closed witchpiggie closed 1 month ago

witchpiggie commented 1 month ago

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

W 0:00:01:0125 ::set_data: ConvexPolygon shape points changed from size 6 to 4 <C++ Source> src\shapes\rapier_convex_polygon_shape.rs:118 @ ::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:

Ughuuu commented 1 month ago

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

witchpiggie commented 1 month ago

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

Ughuuu commented 1 month ago

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 commented 1 month ago

Alright. Thanks for the info.

Ughuuu commented 1 month ago

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 commented 1 month ago

I'm still getting warnings:

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

Ughuuu commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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.