Physics Accuracy Issues...
Posted: Fri Nov 12, 2010 4:31 am
Hey Norbo, we are going though all the objects in our game editor (about 150 now) and bug fixing them and improveing them greatly...
I have been fixing the "Steerable Wheel" today and have made it totally awesome as it now has suspension amonst other improvements (like jumping and variable gear support) but i'm having lots of in accuracy issues sadly with the joints...
Here is a video of the problem...
But also even stacking 5 boxes ontop of each other causes lots and lots of jittering, what am i doing wrong with the engine?
Here is a video
http://www.youtube.com/watch?v=6smF6GbOz58
Anyway the details you may want are:
space = new Space();
space.SimulationSettings.MotionUpdate.Gravity = new Vector3(0, -8f, 0);
//space.SimulationSettings.collisionDetection.collisionDetectionType = CollisionDetectionType.fullyContinuous;
//space.SimulationSettings.collisionDetection.useContinuousDetectionAgainstMovingKinematics = false;
//space.SimulationSettings.motionUpdate.useRK4AngularIntegration = true;
//space.SimulationSettings.motionUpdate.conserveAngularMomentum = true;
space.SimulationSettings.Deactivation.NumEntitiesToTryToDeactivatePerFrame = 20;
space.SimulationSettings.Deactivation.LinearVelocityClampingTime = 0.5f;
space.SimulationSettings.Deactivation.LinearVelocityClamping = 0.1f;
space.SimulationSettings.CollisionDetection.BouncinessBlendMethod = PropertyBlendMethod.BiasHigh;
space.SimulationSettings.CollisionDetection.FrictionBlendMethod = PropertyBlendMethod.BiasLow;
space.SimulationSettings.CollisionDetection.CollisionDetectionType = CollisionDetectionType.DiscreteMPRGJK;
space.SimulationSettings.CollisionDetection.ContactInvalidationLengthSquared = 0.025f;
space.SimulationSettings.CollisionDetection.DefaultAllowedPenetration = 0.01f;
space.SimulationSettings.CollisionDetection.DefaultMargin = 0.05f;
space.SimulationSettings.CollisionDetection.UseContinuousDetectionAgainstMovingKinematics = false;
space.SimulationSettings.CollisionDetection.UseContinuousDetectionInNoResponsePairs = false;
space.SimulationSettings.CollisionDetection.UseOneShotManifolds = true;
space.SimulationSettings.CollisionResponse.Iterations = 16;
space.SimulationSettings.TimeStep.TimeStepDuration = 1 / 60f;
if (Environment.ProcessorCount > 1)
{
for (int i = 0; i < Environment.ProcessorCount; i++)
space.ThreadManager.AddThread();
space.UseMultithreadedUpdate = true;
}
space.SimulationSettings.TimeStep.UseInternalTimeStepping = true;
Does anything jump out at you as being a problem?
Oh and the platforms are about 6 by 6 by 1
And the wheels are 0.5f for width and have a radius of 1
The wheels cube that they use for there spring is 0.5f by 0.5f by 0.5f and is connected with a point on line joint and has another joint for limiting the 2 rotational axis's for the wheel.
The wheels are locked in the video so it didn't just roll away.
The wheels weight is 35 there attach cube is 20 and the platform on the cars top is 20 (any heavyer and it gets way worse)
The stacked platforms weights are all 20 too.
At the start of the video i move the car around a bit to just show the springs working, but all the rest of the jittering is not me moving the car.
They are all sitting on a fairly complex static tri mesh with a verts in a 3 by 3 grid
The issue also happens if they on static objects...
Anyway if you have any ideas that would be great as we are trying to polish everything off and get it ready for release.
Thanks again.
I have been fixing the "Steerable Wheel" today and have made it totally awesome as it now has suspension amonst other improvements (like jumping and variable gear support) but i'm having lots of in accuracy issues sadly with the joints...
Here is a video of the problem...
But also even stacking 5 boxes ontop of each other causes lots and lots of jittering, what am i doing wrong with the engine?
Here is a video
http://www.youtube.com/watch?v=6smF6GbOz58
Anyway the details you may want are:
space = new Space();
space.SimulationSettings.MotionUpdate.Gravity = new Vector3(0, -8f, 0);
//space.SimulationSettings.collisionDetection.collisionDetectionType = CollisionDetectionType.fullyContinuous;
//space.SimulationSettings.collisionDetection.useContinuousDetectionAgainstMovingKinematics = false;
//space.SimulationSettings.motionUpdate.useRK4AngularIntegration = true;
//space.SimulationSettings.motionUpdate.conserveAngularMomentum = true;
space.SimulationSettings.Deactivation.NumEntitiesToTryToDeactivatePerFrame = 20;
space.SimulationSettings.Deactivation.LinearVelocityClampingTime = 0.5f;
space.SimulationSettings.Deactivation.LinearVelocityClamping = 0.1f;
space.SimulationSettings.CollisionDetection.BouncinessBlendMethod = PropertyBlendMethod.BiasHigh;
space.SimulationSettings.CollisionDetection.FrictionBlendMethod = PropertyBlendMethod.BiasLow;
space.SimulationSettings.CollisionDetection.CollisionDetectionType = CollisionDetectionType.DiscreteMPRGJK;
space.SimulationSettings.CollisionDetection.ContactInvalidationLengthSquared = 0.025f;
space.SimulationSettings.CollisionDetection.DefaultAllowedPenetration = 0.01f;
space.SimulationSettings.CollisionDetection.DefaultMargin = 0.05f;
space.SimulationSettings.CollisionDetection.UseContinuousDetectionAgainstMovingKinematics = false;
space.SimulationSettings.CollisionDetection.UseContinuousDetectionInNoResponsePairs = false;
space.SimulationSettings.CollisionDetection.UseOneShotManifolds = true;
space.SimulationSettings.CollisionResponse.Iterations = 16;
space.SimulationSettings.TimeStep.TimeStepDuration = 1 / 60f;
if (Environment.ProcessorCount > 1)
{
for (int i = 0; i < Environment.ProcessorCount; i++)
space.ThreadManager.AddThread();
space.UseMultithreadedUpdate = true;
}
space.SimulationSettings.TimeStep.UseInternalTimeStepping = true;
Does anything jump out at you as being a problem?
Oh and the platforms are about 6 by 6 by 1
And the wheels are 0.5f for width and have a radius of 1
The wheels cube that they use for there spring is 0.5f by 0.5f by 0.5f and is connected with a point on line joint and has another joint for limiting the 2 rotational axis's for the wheel.
The wheels are locked in the video so it didn't just roll away.
The wheels weight is 35 there attach cube is 20 and the platform on the cars top is 20 (any heavyer and it gets way worse)
The stacked platforms weights are all 20 too.
At the start of the video i move the car around a bit to just show the springs working, but all the rest of the jittering is not me moving the car.
They are all sitting on a fairly complex static tri mesh with a verts in a 3 by 3 grid
The issue also happens if they on static objects...
Anyway if you have any ideas that would be great as we are trying to polish everything off and get it ready for release.
Thanks again.