C# 클래스 SuperCharacterController.SuperGround, SuperCharacterController

파일 보기 프로젝트 열기: IronWarrior/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