Closed kan6868 closed 3 months ago
I had some confusion about runtime.GetFPS. It's similar to 1 / (physics.GetTimeStep() * physics.GetTimeScale()). So I reverted the commit 0c869d3.
I think motorSpeed
for Wheel Joint
should be radians per seconds, the same as the Revolute Joint
.
if ( lua_isnumber( L, 3 ) )
{
Rtt_Real valueRadians = Rtt_RealDegreesToRadians( luaL_toreal( L, 3 ) );
joint->SetMotorSpeed( Rtt_RealToFloat( valueRadians ) );
}
Nice job on the fix! I had a PR (#641) suggesting a solution for the axis issue. Glad to see progress on this.
OK, I'll do some tests on it. And push a new commit.
Nice job on the fix! I had a PR (#641) suggesting a solution for the axis issue. Glad to see progress on this.
Your solution about the axis is correct when normalizing values to 1 or -1.
I'm also encountering an issue with the axis of the wheel joint; it seems more like a piston force along the axis.
However, this might necessitate changes to the previous project's attributes: springDampingRatio and springFrequency.
We need some opinions from @Shchvova , and it should be in a new pull request.
Nice job on the fix! I had a PR (#641) suggesting a solution for the axis issue. Glad to see progress on this.
Your solution about the axis is correct when normalizing values to 1 or -1.
I'm also encountering an issue with the axis of the wheel joint; it seems more like a piston force along the axis.
However, this might necessitate changes to the previous project's attributes: springDampingRatio and springFrequency.
We need some opinions from @Shchvova , and it should be in a new pull request.
I have added a parameter isNormalizeAxis at the end of the method for creating a wheel joint. This allows normalizing the axis range from -1 to 1 without affecting other projects.
local wheelJoint = physics.newJoint( "wheel", bodyA, bodyB, anchor_x, anchor_y, axisX, axisY, [isNormalizeAxis])
Issue: https://github.com/coronalabs/corona/assets/70838508/8b2cc0b4-dc26-49f5-b014-4bd296f5c313
Fixed: https://github.com/coronalabs/corona/assets/70838508/e76b467e-bd65-404b-a840-6dcfa0e116b1
Code - Test: