Method | Description | |
---|---|---|
DebugGround ( bool primary, bool near, bool far, bool flush, bool step ) : void | ||
Distance ( ) : float | ||
IsGrounded ( bool currentlyGrounded, float distance ) : bool | ||
IsGrounded ( bool currentlyGrounded, float distance, Vector3 &groundNormal ) : bool | ||
PrimaryNormal ( ) : Vector3 | ||
ProbeGround ( Vector3 origin, int iter ) : void |
Scan the surface below us for ground. Follow up the initial scan with subsequent scans designed to test what kind of surface we are standing above and handle different edge cases
|
|
SuperGround ( LayerMask walkable, SuperCharacterController, controller, QueryTriggerInteraction triggerInteraction ) : System |
Method | Description | |
---|---|---|
OnSteadyGround ( Vector3 normal, Vector3 point ) : bool |
To help the controller smoothly "fall" off surfaces and not hang on the edge of ledges, check that the ground below us is "steady", or that the controller is not standing on too extreme of a ledge
|
|
ResetGrounds ( ) : void | ||
SimulateSphereCast ( Vector3 groundNormal, |
Provides raycast data based on where a SphereCast would contact the specified normal Raycasting downwards from a point along the controller's bottom sphere, based on the provided normal
|
public DebugGround ( bool primary, bool near, bool far, bool flush, bool step ) : void | ||
primary | bool | |
near | bool | |
far | bool | |
flush | bool | |
step | bool | |
return | void |
public IsGrounded ( bool currentlyGrounded, float distance ) : bool | ||
currentlyGrounded | bool | |
distance | float | |
return | bool |
public IsGrounded ( bool currentlyGrounded, float distance, Vector3 &groundNormal ) : bool | ||
currentlyGrounded | bool | |
distance | float | |
groundNormal | Vector3 | |
return | bool |
public ProbeGround ( Vector3 origin, int iter ) : void | ||
origin | Vector3 | Center of the sphere for the initial SphereCast |
iter | int | Debug tool to print out which ProbeGround iteration is being run (3 are run each frame for the controller) |
return | void |
public SuperGround ( LayerMask walkable, SuperCharacterController, controller, QueryTriggerInteraction triggerInteraction ) : System | ||
walkable | LayerMask | |
controller | SuperCharacterController, | |
triggerInteraction | QueryTriggerInteraction | |
return | System |