C# Class SuperCharacterController.SuperGround, SuperCharacterController

Afficher le fichier Open project: IronWarrior/SuperCharacterController

Méthodes publiques

Méthode 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

Private Methods

Méthode 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, RaycastHit &hit ) : bool

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

Method Details

DebugGround() public méthode

public DebugGround ( bool primary, bool near, bool far, bool flush, bool step ) : void
primary bool
near bool
far bool
flush bool
step bool
Résultat void

Distance() public méthode

public Distance ( ) : float
Résultat float

IsGrounded() public méthode

public IsGrounded ( bool currentlyGrounded, float distance ) : bool
currentlyGrounded bool
distance float
Résultat bool

IsGrounded() public méthode

public IsGrounded ( bool currentlyGrounded, float distance, Vector3 &groundNormal ) : bool
currentlyGrounded bool
distance float
groundNormal Vector3
Résultat bool

PrimaryNormal() public méthode

public PrimaryNormal ( ) : Vector3
Résultat Vector3

ProbeGround() public méthode

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
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)
Résultat void

SuperGround() public méthode

public SuperGround ( LayerMask walkable, SuperCharacterController, controller, QueryTriggerInteraction triggerInteraction ) : System
walkable LayerMask
controller SuperCharacterController,
triggerInteraction QueryTriggerInteraction
Résultat System