HarvestableClass.server_onCollision

Called when the Harvestable collides with another object.

Kind: Callback

Environments: Game

Game

Callback side: Server

HarvestableClass:server_onCollision(
    other,
    position,
    selfPointVelocity,
    otherPointVelocity,
    normal
)

Open the full Game reference

Parameters:

Name Type Description
self table The class instance.
other Shape/Character The other object.
position Vec3 The position in world space where the collision occurred.
selfPointVelocity Vec3 The velocity that the Harvestable had at the point of collision.
otherPointVelocity Vec3 The velocity that the other object had at the point of collision.
normal Vec3 The collision normal between the Harvestable and the other other object.