Escape

Escape(float, float, Vector3, float)

public bool Escape(float speed, float distance, Vector3 targetPosition, float distanceToCorner) ;

Description

Keep away from specified position

Parameters

Parameter Name Description
speed Speed to move
distance Distance away
targetPosition Target
distanceToCorner The distance to determine the vicinity of the corner.
Used to detour corners so that you can't be cornered by the wall

Returns

Returns true if the destination setting is successful. Otherwise false.

Escape(float, float, Transform, float)

public bool Escape(float speed, float distance, Transform target, float distanceToCorner) ;

Description

Away from the specified Transform

Parameters

Parameter Name Description
speed Speed to move
distance Distance away
target Target
distanceToCorner The distance to determine the vicinity of the corner.
Used to detour corners so that you can't be cornered by the wall

Returns

Returns true if the destination setting is successful. Otherwise false.