Api Sandbox CharacterControllerHelper
struct

CharacterControllerHelper

public sealed struct CharacterControllerHelper

Constructors

CharacterControllerHelper(SceneTrace trace, Vector3 position, Vector3 velocity)

Methods

SceneTraceResult TraceFromTo(Vector3 start, Vector3 end)

Trace this from one position to another

Single TryMove(Single timestep)

Try to move to the position. Will return the fraction of the desired velocity that we traveled. Position and Velocity will be what we recommend using.

SceneTraceResult TraceMove(Vector3 delta)

Move our position by this delta using trace. If we hit something we'll stop, we won't slide across it nicely like TryMove does.

Single TryMoveWithStep(Single timeDelta, Single stepsize)

Like TryMove but will also try to step up if it hits a wall

Fields

Name Type Description
Position Vector3
Velocity Vector3
Bounce Single
MaxStandableAngle Single
Trace SceneTrace
Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.CharacterControllerHelper