WorldClass.server_onCollision

Called when a collision occurs in this world.

Kind: Callback

Environments: Game

Game

Callback side: Server

WorldClass:server_onCollision(
    objectA,
    objectB,
    position,
    pointVelocityA,
    pointVelocityB,
    normal
)

Open the full Game reference

Parameters:

Name Type Description
self table The class instance.
objectA Shape/Character/Harvestable/Lift/nil The first colliding object. Nil if terrain.
objectB Shape/Character/Harvestable/Lift/nil The other colliding object. Nil if terrain.
position Vec3 The position in world space where the collision occurred.
pointVelocityA Vec3 The velocity that that the first object had at the point of collision.
pointVelocityB Vec3 The velocity that that the other object had at the point of collision.
normal Vec3 The collision normal from objectA to objectB.