NPC Behaviour
This component belongs to the following package:
- com.yahaha.sdk.npc
This NPC Behaviour Component turns an object into a non-player character (NPC) and configures its behavior.
Property | Description |
---|---|
Is Debug | If enabled, the Component runs in debug mode, providing additional information for testing and troubleshooting purposes in the console. |
Alert Radius | Determines the distance within which the NPC will actively search for enemies. If an enemy enters this radius, the NPC will initiate appropriate actions. |
Default Behavior | The initial behavior that the NPC will exhibit when there are no specific triggers or events affecting its actions. |
Avoidance Radius | Specifies the distance around the NPC within which it will try to avoid obstacles and other objects. Minimum value: 0.05. Default value: 0.5. |
Avoidance Height | Determines the vertical clearance required by the NPC to avoid obstacles and other objects. Minimum value: 0.001. Default value: 2. |
Speed | Sets the base movement speed of the NPC. This value affects the overall movement and navigation behavior of the NPC. Minimum value: 0. Default value: 4. |
Angular Speed | Determines how fast the NPC can rotate or turn around its vertical axis. It affects the NPC's ability to change direction smoothly. Minimum value: 0. Default value: 720. |
Acceleration | Controls how quickly the NPC's speed increases during movement. Higher acceleration value allows for faster speed changes and more responsive movement. Minimum value: 0. Default value: 8. |
Events and Actions
Events
- None
Actions
-
StopMove: Stops the NPC's movement.
-
MoveTo: Moves the NPC to a specific point at an accelerated speed.
- Arguments
- point: The world space coordinates to move to .
- speedRate: Speed multiplier.
- Arguments
-
ChangeBehaviour Changes the NPC's behavior.
- Arguments
- behaviour: NPC's specific behavior
- Arguments