class ICharacterControllerImplementation

Low-level interface for a character controller.

Should be implemented by the physics plugin to provide functionality.

Public

Methods

~ICharacterControllerImplementation

virtual ~ICharacterControllerImplementation() = default

Move

virtual CharacterCollisionFlags Move(const Vector3 &displacement) = 0

Moves the controller in the specified direction by the specified amount, while interacting with surrounding geometry.

Returns flags signaling where collision occurred after the movement.

Does not account for gravity, you must apply it manually.

SetPosition

virtual void SetPosition(const Vector3 &position) = 0

Determines position of the center of the controller.

This will teleport the character to the location. Use Move() for movement that includes physics.

GetPosition

virtual Vector3 GetPosition() const = 0

SetFootPosition

virtual void SetFootPosition(const Vector3 &position) = 0

Determines the position of the bottom of the controller.

Position takes contact offset into account. Changing this will teleport the character to the location. Use Move() for movement that includes physics.

GetFootPosition

virtual Vector3 GetFootPosition() const = 0

SetRadius

virtual void SetRadius(float radius) = 0

Determines the radius of the controller capsule.

GetRadius

virtual float GetRadius() const = 0

SetHeight

virtual void SetHeight(float height) = 0

Determines the height between the centers of the two spheres of the controller capsule.

GetHeight

virtual float GetHeight() const = 0

SetUp

virtual void SetUp(const Vector3 &up) = 0

Determines the up direction of capsule.

Determines capsule orientation.

GetUp

virtual Vector3 GetUp() const = 0

SetClimbingMode

virtual void SetClimbingMode(CharacterClimbingMode mode) = 0

Controls what happens when character encounters a height higher than its step offset.

GetClimbingMode

virtual CharacterClimbingMode GetClimbingMode() const = 0

SetNonWalkableMode

virtual void SetNonWalkableMode(CharacterNonWalkableMode mode) = 0

Controls what happens when character encounters a slope higher than its slope offset.

GetNonWalkableMode

virtual CharacterNonWalkableMode GetNonWalkableMode() const = 0

SetMinMoveDistance

virtual void SetMinMoveDistance(float value) = 0

Represents minimum distance that the character will move during a call to Move().

This is used to stop the recursive motion algorithm when the remaining distance is too small.

GetMinMoveDistance

virtual float GetMinMoveDistance() const = 0

SetContactOffset

virtual void SetContactOffset(float value) = 0

Contact offset specifies a skin around the object within which contacts will be generated.

It should be a small positive non-zero value.

GetContactOffset

virtual float GetContactOffset() const = 0

SetStepOffset

virtual void SetStepOffset(float value) = 0

Controls which obstacles will the character be able to automatically step over without being stopped.

This is the height of the maximum obstacle that will be stepped over (with exceptions, see ClimbingMode).

GetStepOffset

virtual float GetStepOffset() const = 0

SetSlopeLimit

virtual void SetSlopeLimit(Radian value) = 0

Controls which slopes should the character consider too steep and won't be able to move over.

See NonWalkableMode for more information.

GetSlopeLimit

virtual Radian GetSlopeLimit() const = 0