But now that I have fixed most coordinate system problems I still have a problem with LinearVelocity and objects that stop moving slowly despite having LinarVelocity.
This is from the debugger:
obj.PhysicsEntity.LinearVelocity {2.107735, -0.01689263, -1.474374} BEPUutilities.Vector3
and this is never changing:
obj.PhysicsEntity.Position {-4013779, 49.87001, -5923159} BEPUutilities.Vector3
It does not always happen, I have seen objects move slow, but this object now is not moving for reasons I do not understand yet. Is it something like a rounding problem? The speed is too slow? Or what could be the problem?
I have also looked at the BufferedStates, but nothing is moving there either.
I am not doing much in my code with BEPU, so I have not really changed any defaults. This is like my complete BEPU code:
Code: Select all
public Space PhysicsSpace = new Space();
Data.PhysicsSpace.BufferedStates.Enabled = true;
Data.PhysicsSpace.TimeStepSettings.MaximumTimeStepsPerFrame = 10;
Data.PhysicsSpace.TimeStepSettings.TimeStepDuration = ((float)CALCULATE_POSITIONS_TIME_INTERVAL_MS) / 1000 / 10;
Data.PhysicsSpace.Update((float)(ms / 1000));
obj.PhysicsEntity = new BEPUphysics.Entities.Prefabs.Box(new BEPUutilities.Vector3(), 14, 6, 16);
obj.PhysicsEntity.Mass = 0.000001f;
PhysicsSpace.Add(obj.PhysicsEntity);
Thx for all the help!