BEPUphysics.Paths.PathFollowing.EntityRotator.IDuringForcesUpdateable C# (CSharp) Метод

IDuringForcesUpdateable() приватный Метод

Called automatically by the space.
private IDuringForcesUpdateable ( float dt ) : void
dt float Simulation timestep.
Результат void
        void IDuringForcesUpdateable.Update(float dt)
        {
            if (Entity != AngularMotor.Entity)
                throw new InvalidOperationException(
                    "EntityRotator's entity differs from EntityRotator's motor's entities.  Ensure that the moved entity is only changed by setting the EntityRotator's entity property.");

            if (Entity.IsDynamic)
            {
                AngularMotor.IsActive = true;
                AngularMotor.Settings.Servo.Goal = TargetOrientation;
            }
            else
            {
                AngularMotor.IsActive = false;
                Entity.AngularVelocity = GetAngularVelocity(Entity.Orientation, TargetOrientation, dt);
            }
        }
    }