C# Class AIBehavior.MecanimNavMeshPathScript

Inheritance: MonoBehaviour
显示文件 Open project: NathanWarden/ai-behavior

Public Properties

Property Type Description
directionVariable string
mecanimAnimator Animator
minDistanceMoveThreshold float
rotationLerpRate float
speedVariable string

Public Methods

Method Description
OnDrawGizmos ( ) : void
OnNewDestination ( Vector3 targetPoint, float movementSpeed, float rotationSpeed ) : void
Start ( ) : void
Update ( ) : void
UpdateVerticalAndHorizontalMovement ( ) : void

Private Methods

Method Description
GetCharacterOffsetVector ( ) : Vector3
GetTurnValue ( Vector3 offsetVector ) : float
ShouldMoveForward ( Vector3 offsetVector ) : bool
ShouldTurn ( Vector3 offsetVector ) : bool

Method Details

OnDrawGizmos() public method

public OnDrawGizmos ( ) : void
return void

OnNewDestination() public method

public OnNewDestination ( Vector3 targetPoint, float movementSpeed, float rotationSpeed ) : void
targetPoint Vector3
movementSpeed float
rotationSpeed float
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

UpdateVerticalAndHorizontalMovement() public method

public UpdateVerticalAndHorizontalMovement ( ) : void
return void

Property Details

directionVariable public_oe property

This needs to be the name as the Direction variable within your mecanim AnimationController.
public string directionVariable
return string

mecanimAnimator public_oe property

This is a reference to the Animator component you wish to target. If none is specified, it will automatically try and find one within this MonoBehaviour or its' children.
public Animator mecanimAnimator
return Animator

minDistanceMoveThreshold public_oe property

This is the minimum distance the agent needs to be from its' destination before it starts moving.
public float minDistanceMoveThreshold
return float

rotationLerpRate public_oe property

This is how fast the mecanim Direction variable will be lerped.
public float rotationLerpRate
return float

speedVariable public_oe property

This needs to be the name as the Speed variable within your mecanim AnimationController.
public string speedVariable
return string