UNPKG

hytopia

Version:

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

78 lines (37 loc) 1.13 kB
<!-- 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; [addToSimulation](./server.collider.addtosimulation.md) ## Collider.addToSimulation() method Adds the collider to the simulation. **Signature:** ```typescript addToSimulation(simulation: Simulation, parentRigidBody?: RigidBody): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> simulation </td><td> [Simulation](./server.simulation.md) </td><td> The simulation to add the collider to. </td></tr> <tr><td> parentRigidBody </td><td> [RigidBody](./server.rigidbody.md) </td><td> _(Optional)_ The parent rigid body of the collider. \*\*Category:\*\* Physics </td></tr> </tbody></table> **Returns:** void ## Remarks \*\*Parent linking:\*\* Links the collider to the parent rigid body if provided. \*\*Collision callback:\*\* Applies any configured `onCollision` callback.