Add Velocity
Adds or sets the velocity of the target entity, based on the direction from the actor entity to the target entity.
Type ID: origins:add_velocity
Note
If the action behaves unexpectedly, try setting either the client
(should always work) or server
(might not work) boolean fields to false
. Here are some examples.
Fields
Field | Type | Default | Description |
---|---|---|---|
x |
Float | 0.0 |
The amount of velocity to add on the x-axis. |
y |
Float | 0.0 |
The amount of velocity to add on the y-axis. |
z |
Float | 0.0 |
The amount of velocity to add on the z-axis. |
reference |
String | "position" |
Determines whether to use the target entity's "position" or "rotation" when calculating the velocity that will be applied to the target entity. |
client |
Boolean | true |
If this is false, the action will not execute on the client. |
server |
Boolean | true |
If this is false, the action will not execute on the server. |
set |
Boolean | false |
If this is true, the action will act as a "set" velocity action, overriding the entity's current velocity instead of adding to it. |
Examples
"bientity_action": {
"type": "origins:add_velocity",
"z": -2
}
This example will "pull" the target entity to the actor entity.