UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

54 lines (26 loc) 787 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [Collider](./server.collider.md) &gt; [setOnCollision](./server.collider.setoncollision.md) ## Collider.setOnCollision() method Sets the on collision callback for the collider. **Signature:** ```typescript setOnCollision(callback: CollisionCallback | undefined): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> callback </td><td> [CollisionCallback](./server.collisioncallback.md) \| undefined </td><td> The on collision callback for the collider. </td></tr> </tbody></table> **Returns:** void