C# Класс BEPUphysicsDemos.SampleCode.UprightSpring

Spring that attempts to keep a target entity oriented in a given direction by applying corrective torques.
Наследование: Updateable, IDuringForcesUpdateable
Показать файл Открыть проект

Открытые методы

Метод Описание
UprightSpring ( Entity entity, Vector3 upVector, float minimumAngle, float maximumAngle, float correctionFactor ) : System

Constructs a constraint to keep entities upright.

Приватные методы

Метод Описание
IDuringForcesUpdateable ( float dt ) : void

Updates the upright constraint. Called automatically by its owning space.

Описание методов

UprightSpring() публичный Метод

Constructs a constraint to keep entities upright.
public UprightSpring ( Entity entity, Vector3 upVector, float minimumAngle, float maximumAngle, float correctionFactor ) : System
entity Entity Entity to try to keep upright.
upVector Vector3 Direction to try to orient the entity with.
minimumAngle float Minimum angle between the car's transformed up vector and the actual up vector /// before the constraint begins to apply forces.
maximumAngle float Maximum angle between the car's transformed up vector and the actual up vector /// past which the constraint 'gives up' and lets the entity tumble.
correctionFactor float Factor of the orientation error to apply in angular velocity each frame.
Результат System