BEPUphysicsDemos.SampleCode.UprightSpring.UprightSpring C# (CSharp) Method

UprightSpring() public method

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.
return System
        public UprightSpring(Entity entity, Vector3 upVector, float minimumAngle, float maximumAngle, float correctionFactor)
        {
            this.Entity = entity;
            this.UpVector = upVector;
            this.MinimumAngle = minimumAngle;
            this.MaximumAngle = maximumAngle;
            this.CorrectionFactor = correctionFactor;
        }