C# Класс SuperCharacterController.SuperGround, SuperCharacterController

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

DebugGround() публичный Метод

public DebugGround ( bool primary, bool near, bool far, bool flush, bool step ) : void
primary bool
near bool
far bool
flush bool
step bool
Результат void

Distance() публичный Метод

public Distance ( ) : float
Результат float

IsGrounded() публичный Метод

public IsGrounded ( bool currentlyGrounded, float distance ) : bool
currentlyGrounded bool
distance float
Результат bool

IsGrounded() публичный Метод

public IsGrounded ( bool currentlyGrounded, float distance, Vector3 &groundNormal ) : bool
currentlyGrounded bool
distance float
groundNormal Vector3
Результат bool

PrimaryNormal() публичный Метод

public PrimaryNormal ( ) : Vector3
Результат Vector3

ProbeGround() публичный Метод

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)
Результат void

SuperGround() публичный Метод

public SuperGround ( LayerMask walkable, SuperCharacterController, controller, QueryTriggerInteraction triggerInteraction ) : System
walkable LayerMask
controller SuperCharacterController,
triggerInteraction QueryTriggerInteraction
Результат System