UnitClass.server_onCollision
Called when the Unit's Character collides with another object.
Kind: Callback
Environments: Game
Game
Callback side: Server
UnitClass:server_onCollision(
other,
position,
selfPointVelocity,
otherPointVelocity,
normal
)
Parameters:
| Name | Type | Description |
|---|---|---|
self |
table | The class instance. |
other |
Shape/Character/Harvestable/Lift/nil | The other object. Nil if terrain. |
position |
Vec3 | The position in world space where the collision occurred. |
selfPointVelocity |
Vec3 | The velocity that that the Unit's Character had at the point of collision. |
otherPointVelocity |
Vec3 | The velocity that that the other object had at the point of collision. |
normal |
Vec3 | The collision normal between the Unit's Character and the other other object. |