API ReferenceSandbox
CharacterControllerHelperclass
object→CharacterControllerHelper
Constructors1
Showing 1 constructors
public CharacterControllerHelper(Sandbox.SceneTrace trace, Vector3 position, Vector3 velocity)
| Parameter | Type | Description |
|---|---|---|
| trace | SceneTrace | — |
| position | Vector3 | — |
| velocity | Vector3 | — |
No results match this filter.
Methods4
Showing 4 methods
public Sandbox.SceneTraceResult TraceFromTo(Vector3 start, Vector3 end)
Trace this from one position to another
| Parameter | Type | Description |
|---|---|---|
| start | Vector3 | — |
| end | Vector3 | — |
public Sandbox.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.
| Parameter | Type | Description |
|---|---|---|
| delta | Vector3 | — |
public float TryMove(float 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.
| Parameter | Type | Description |
|---|---|---|
| timestep | float | — |
Returns:
float—public float TryMoveWithStep(float timeDelta, float stepsize)
Like TryMove but will also try to step up if it hits a wall
| Parameter | Type | Description |
|---|---|---|
| timeDelta | float | — |
| stepsize | float | — |
Returns:
float—No results match this filter.