sharkyx
26-04-2006 15:56:53
Hi,
I have two parallel worlds and an object that has newton bodies in both worlds, at the same position.
The object is using the Custom2DJoint so it sticks to the x/z plane.
The object uses an Ellipsoid as collision and has mass 100.
Now, when I move the object, I addForce() it in both worlds, with the same force vector.
In one world, the object moves slightly faster than in the other world. I logged the bodies' velocities to see what is going on and, interestingly, in the faster moving world, the velocity gets _much_ higher very fast, although the object is moving only slightly faster visually.
Of course, these are two different newton bodies and the force is applied in the correct callback (CustomForceAndTorqueCallback) of each of them. Inside the callback, I logged all relevant values (mass and inertia, and the force applied) and they are 100% equal in both worlds.
Torque and omega on the other hand are 100% in sync in both worlds, so it can't be a problem with one world stepping faster than the other.
Any idea how that could happen?
I have two parallel worlds and an object that has newton bodies in both worlds, at the same position.
The object is using the Custom2DJoint so it sticks to the x/z plane.
The object uses an Ellipsoid as collision and has mass 100.
Now, when I move the object, I addForce() it in both worlds, with the same force vector.
In one world, the object moves slightly faster than in the other world. I logged the bodies' velocities to see what is going on and, interestingly, in the faster moving world, the velocity gets _much_ higher very fast, although the object is moving only slightly faster visually.
worldid vel.x vel.y vel.z
3 0.00 0.00 0.00
2 0.00 0.00 0.00
3 0.00 0.00 -8.33 <- after first addForce()
2 0.00 0.00 -0.25
3 0.00 0.00 -16.65
2 0.00 0.00 -0.50
3 0.00 0.00 -24.95
2 0.00 0.00 -0.75
3 0.00 0.00 -33.23
2 0.00 0.00 -1.00
3 0.00 0.00 -41.49
2 0.00 0.00 -1.24
3 0.00 0.00 -49.74
2 0.00 0.00 -1.49
3 0.00 0.00 -57.97
2 0.00 0.00 -1.74
3 0.00 0.00 -66.18
2 0.00 0.00 -1.99
3 0.00 0.00 -74.38
2 0.00 0.00 -2.23
3 0.00 0.00 -82.55
2 0.00 0.00 -2.48
3 0.00 0.00 -90.71
2 0.00 0.00 -2.72
3 0.00 0.00 -98.86
2 0.00 0.00 -2.97
3 0.00 0.00 -106.99
2 0.00 0.00 -3.21
3 0.00 0.00 -115.09
2 0.00 0.00 -3.45
3 0.00 0.00 -123.19
2 0.00 0.00 -3.70
3 0.00 0.00 -131.26
2 0.00 0.00 -3.94
3 0.00 0.00 -139.32
2 0.00 0.00 -4.18
3 0.00 0.00 -147.36
2 0.00 0.00 -4.42
3 0.00 0.00 -155.39
2 0.00 0.00 -4.66
3 0.00 0.00 -163.40
2 0.00 0.00 -4.90
3 0.00 0.00 -171.39
2 0.00 0.00 -5.14
3 0.00 0.00 -179.37
2 0.00 0.00 -5.38
3 0.00 0.00 -187.32
2 0.00 0.00 -5.62
3 0.00 0.00 -195.27
2 0.00 0.00 -5.86
3 0.00 0.00 -203.19
2 0.00 0.00 -6.10
Of course, these are two different newton bodies and the force is applied in the correct callback (CustomForceAndTorqueCallback) of each of them. Inside the callback, I logged all relevant values (mass and inertia, and the force applied) and they are 100% equal in both worlds.
Torque and omega on the other hand are 100% in sync in both worlds, so it can't be a problem with one world stepping faster than the other.
Any idea how that could happen?