CharacterClass.client_onCollision

Called when the Character collides with another object.

Kind: Callback

Environments: Game

Game

Callback side: Client

CharacterClass:client_onCollision(
    other,
    position,
    selfPointVelocity,
    otherPointVelocity,
    normal
)

Open the full Game reference

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 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 Character and the other other object.