BEPUphysics.Paths.PathFollowing.EntityMover.IDuringForcesUpdateable C# (CSharp) Method

IDuringForcesUpdateable() private method

Called automatically by the space.
private IDuringForcesUpdateable ( float dt ) : void
dt float Simulation timestep.
return void
        void IDuringForcesUpdateable.Update(float dt)
        {
            if (Entity != LinearMotor.Entity)
                throw new InvalidOperationException(
                    "EntityMover's entity differs from EntityMover's motors' entities.  Ensure that the moved entity is only changed by setting the EntityMover's entity property.");

            if (Entity.IsDynamic)
            {
                LinearMotor.IsActive = true;
                LinearMotor.Settings.Servo.Goal = TargetPosition;
            }
            else
            {
                LinearMotor.IsActive = false;
                Vector3 worldMovedPoint = Vector3.Transform(LocalOffset, entity.WorldTransform);
                Entity.LinearVelocity = GetLinearVelocity(worldMovedPoint, TargetPosition, dt);
            }
        }
    }