WorldClass.client_onProjectile
Called when a projectile hits something in this world.
Kind: Callback
Environments: Game
Game
Callback side: Client
WorldClass:client_onProjectile(
position,
airTime,
velocity,
projectileName,
shooter,
damage,
normal,
target,
uuid
)
Note: If the shooter is destroyed before the projectile hits, the shooter value will be nil.
Parameters:
| Name | Type | Description |
|---|---|---|
self |
table | The class instance. |
position |
Vec3 | The position in world space where the projectile hit. |
airTime |
number | The time, in seconds, that the projectile spent flying before the hit. |
velocity |
Vec3 | The velocity of the projectile at impact. |
projectileName |
string | The name of the projectile. (Legacy, use uuid instead) |
shooter |
Player/Character/Shape/Harvestable/nil | The shooter. Can be a Player, Character, Shape, Harvestable or nil if unknown. |
damage |
integer | The damage value of the projectile. |
normal |
Vec3 | The normal at the point of impact. |
target |
Character/Shape/Harvestable/Lift/nil | The hit target. Can be a Character, Shape, Harvestable, Lift or nil if terrain or unknown. |
uuid |
Uuid | The uuid of the projectile. |