Table of Contents

Class OneBodyAngularServoConstraintComponent

Namespace
Stride.BepuPhysics.Constraints
Assembly
Stride.BepuPhysics.dll

Constrains a single body to a target orientation in space, controlling both rotation and tilt.

This constraint applies torque to make a body gradually align with a specific target orientation. It works like a spring system that pulls the body's orientation (rotation around any axis, including tilt) toward the specified target orientation.

Common uses include:

  • Stabilizing objects to maintain a specific orientation
  • Creating motorized joints that rotate/tilt objects to desired angles
  • Simulating gyroscopic or magnetic orientation control

The spring and servo settings control how quickly and forcefully the body moves toward the target orientation.

[DataContract]
[DefaultEntityComponentProcessor(typeof(ConstraintProcessor), ExecutionMode = ExecutionMode.Runtime)]
[ComponentCategory("Physics - Bepu Constraint")]
public sealed class OneBodyAngularServoConstraintComponent : OneBodyConstraintComponent<OneBodyAngularServo>, IIdentifiable
Inheritance
ConstraintComponent<OneBodyAngularServo>
OneBodyConstraintComponent<OneBodyAngularServo>
OneBodyAngularServoConstraintComponent
Implements
Inherited Members

Constructors

OneBodyAngularServoConstraintComponent()

public OneBodyAngularServoConstraintComponent()

Properties

ServoBaseSpeed

public float ServoBaseSpeed { get; set; }

Property Value

float

ServoMaximumForce

public float ServoMaximumForce { get; set; }

Property Value

float

ServoMaximumSpeed

public float ServoMaximumSpeed { get; set; }

Property Value

float

SpringDampingRatio

public float SpringDampingRatio { get; set; }

Property Value

float

SpringFrequency

public float SpringFrequency { get; set; }

Property Value

float

TargetOrientation

public Quaternion TargetOrientation { get; set; }

Property Value

Quaternion