corona icon indicating copy to clipboard operation
corona copied to clipboard

[PHYSICS]: Wheel Joint axis issue.

Open kan6868 opened this issue 1 year ago • 0 comments

There seems to be an issue with the Axis of the Wheel Joint; it doesn't behave like a pivot as the documentation describes. Specifically, it doesn't work when you set the axis to 0, 1:

https://github.com/coronalabs/corona/assets/70838508/df4221e4-14d7-4868-8860-66bd71cd24d0

Even when you set the springFrequency value higher, the issue becomes more complex.

When I change the axis value to 0, 30, the issue is temporarily resolved, but it's still unstable and difficult to predict accurately when you change the two parameters springDampingRatio and springFrequency.

Additionally, there's an issue where setting the axis value too high will break the physics system.

https://github.com/coronalabs/corona/assets/70838508/f9b828d9-f512-44e9-a4d6-6373fe967cad

I've seen a //TODO command in Rtt_LuaLibPhysics.cpp, which might be referring to this issue. A solution has been suggested in #641 , and I've tested it, and it works well.

But this means that previous projects using the Wheel Joint need to adjust their initialization parameters.

@Shchvova , what do you think about this?

kan6868 avatar May 06 '24 07:05 kan6868