UNPKG

hytopia

Version:

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

60 lines (29 loc) 1.18 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [RigidBody](./server.rigidbody.md) &gt; [createAndAddChildColliders](./server.rigidbody.createandaddchildcolliders.md) ## RigidBody.createAndAddChildColliders() method Creates and adds multiple child colliders to the rigid body for the simulation it belongs to. **Signature:** ```typescript createAndAddChildColliders(colliderOptions: ColliderOptions[]): Collider[]; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> colliderOptions </td><td> [ColliderOptions](./server.collideroptions.md)<!-- -->\[\] </td><td> The options for the child colliders to add to the rigid body. </td></tr> </tbody></table> **Returns:** [Collider](./server.collider.md)<!-- -->\[\] The child colliders that were added to the rigid body. ## Remarks If the rigid body is not simulated, the colliders will be added to the rigid body as pending child colliders and also simulated when the rigid body is simulated.