Infohazard.HyperNav 1.1.5
3D Navigation for Flying Characters
|
Base implementation of IAvoidanceAgent that should work in most scenarios. More...
Public Member Functions | |||
void | UpdateAvoidanceVelocity (Vector3 newAvoidance) | ||
Called by the system to update AvoidanceVelocity.
| |||
void | UpdateAvoidanceVelocity (Vector3 newAvoidance) | ||
Called by the system to update AvoidanceVelocity. More... | |||
Protected Member Functions | |
override void | OnEnable () |
Resets desired velocity and adds self to list of all obstacles. More... | |
override void | OnDisable () |
Removes self from list of all obstacles. More... | |
virtual void | OnEnable () |
Resets desired velocity and adds self to list of all obstacles. More... | |
virtual void | OnDisable () |
Removes self from list of all obstacles. More... | |
Properties | |
virtual float | AvoidanceWeight [get, set] |
How much effort the agent will take to avoid obstacles and other agents. More... | |
virtual float | AvoidancePadding [get, set] |
How much extra space to leave when avoiding obstacles. More... | |
virtual bool | DebugAvoidance [get, set] |
Whether to draw debugging information in the scene view. More... | |
TagMask | AvoidedTags [get, set] |
Tags of objects that the agent will try to avoid. More... | |
Func< Vector3 > | InputVelocityFunc [get, set] |
Function used to calculate InputVelocity. More... | |
override Vector3 | InputVelocity [get] |
The object's desired (or actual) velocity. More... | |
virtual bool | IsActive [get, set] |
Whether the agent should actively avoid obstacles. If false, will still behave as an obstacle. More... | |
virtual Vector3 | AvoidanceVelocity [get] |
The velocity the agent should have in order to avoid collisions with obstacles and other agents. More... | |
virtual Vector3 | NormalizedAvoidanceVelocity [get] |
Avoidance velocity divided by max speed, so it is in [0, 1] range. More... | |
Properties inherited from Infohazard.HyperNav.AvoidanceObstacleBase | |
virtual float | MaxSpeed [get, set] |
Maximum speed the object can travel at. More... | |
virtual float | Radius [get, set] |
Radius of the object from its position. More... | |
virtual Vector3 | Position [get] |
World-space position of the object. More... | |
virtual Vector3 | InputVelocity [get] |
The object's desired (or actual) velocity. More... | |
TagMask | TagMask [get, private set] |
Tag of the object for matching agents' IAvoidanceAgent.AvoidedTags. More... | |
Properties inherited from Infohazard.HyperNav.IAvoidanceObstacle | |
Vector3 | Position [get] |
World-space position of the object. More... | |
Vector3 | InputVelocity [get] |
The object's desired (or actual) velocity. More... | |
float | MaxSpeed [get] |
Maximum speed the object can travel at. More... | |
float | Radius [get] |
Radius of the object from its position. More... | |
TagMask | TagMask [get] |
Tag of the object for matching agents' IAvoidanceAgent.AvoidedTags. More... | |
Properties inherited from Infohazard.HyperNav.IAvoidanceAgent | |
float | AvoidanceWeight [get] |
How much effort the agent will take to avoid obstacles and other agents. More... | |
float | AvoidancePadding [get] |
How much extra space to leave when avoiding obstacles. More... | |
Vector3 | AvoidanceVelocity [get] |
The velocity the agent should have in order to avoid collisions with obstacles and other agents. More... | |
bool | IsActive [get] |
Whether the agent should actively avoid obstacles. If false, will still behave as an obstacle. More... | |
bool | DebugAvoidance [get] |
Whether to draw debugging information in the scene view. More... | |
TagMask | AvoidedTags [get] |
Tags of objects that the agent will try to avoid. More... | |
Events | |
Action< Vector3 > | AvoidanceUpdated |
Invoked when avoidance is updated. More... | |
Private Attributes | |
float | _avoidanceWeight = 1 |
(Serialized) How much effort the agent will take to avoid obstacles and other agents. More... | |
float | _avoidancePadding = 0.1f |
(Serialized) How much extra space to leave when avoiding obstacles. More... | |
bool | _debugAvoidance = false |
(Serialized) Whether to draw debugging information in the scene view. More... | |
TagMask | _avoidedTags = ~0 |
(Serialized) Tags of objects that the agent will try to avoid. More... | |
Base implementation of IAvoidanceAgent that should work in most scenarios.
It gets its desired velocity from a delegate, so you can point it to whatever system you need.
|
protectedvirtual |
Removes self from list of all obstacles.
Reimplemented from Infohazard.HyperNav.AvoidanceObstacleBase.
|
protectedvirtual |
Resets desired velocity and adds self to list of all obstacles.
Reimplemented from Infohazard.HyperNav.AvoidanceObstacleBase.
void Infohazard.HyperNav.AvoidanceAgent.UpdateAvoidanceVelocity | ( | Vector3 | newAvoidance | ) |
Called by the system to update AvoidanceVelocity.
newAvoidance | New avoidance velocity |
Implements Infohazard.HyperNav.IAvoidanceAgent.
|
private |
(Serialized) How much extra space to leave when avoiding obstacles.
|
private |
(Serialized) How much effort the agent will take to avoid obstacles and other agents.
|
private |
(Serialized) Tags of objects that the agent will try to avoid.
|
private |
(Serialized) Whether to draw debugging information in the scene view.
|
getsetadd |
How much extra space to leave when avoiding obstacles.
Implements Infohazard.HyperNav.IAvoidanceAgent.
|
get |
The velocity the agent should have in order to avoid collisions with obstacles and other agents.
Implements Infohazard.HyperNav.IAvoidanceAgent.
|
getset |
How much effort the agent will take to avoid obstacles and other agents.
Implements Infohazard.HyperNav.IAvoidanceAgent.
|
getset |
Tags of objects that the agent will try to avoid.
Implements Infohazard.HyperNav.IAvoidanceAgent.
|
getset |
Whether to draw debugging information in the scene view.
Implements Infohazard.HyperNav.IAvoidanceAgent.
|
get |
The object's desired (or actual) velocity.
Implements Infohazard.HyperNav.IAvoidanceObstacle.
|
getset |
Function used to calculate InputVelocity.
|
getset |
Whether the agent should actively avoid obstacles. If false, will still behave as an obstacle.
Implements Infohazard.HyperNav.IAvoidanceAgent.
|
get |
Avoidance velocity divided by max speed, so it is in [0, 1] range.
Action<Vector3> Infohazard.HyperNav.AvoidanceAgent.AvoidanceUpdated |
Invoked when avoidance is updated.