UNPKG

hytopia

Version:

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

88 lines (41 loc) 1.18 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; [optionsFromModelUri](./server.collider.optionsfrommodeluri.md) ## Collider.optionsFromModelUri() method Creates a collider options object from a modelUri with best approximate shape and size. **Signature:** ```typescript static optionsFromModelUri(modelUri: string, scale?: number, preferredShape?: ColliderShape): ColliderOptions; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> modelUri </td><td> string </td><td> The URI of the model. </td></tr> <tr><td> scale </td><td> number </td><td> _(Optional)_ The scale of the model. </td></tr> <tr><td> preferredShape </td><td> [ColliderShape](./server.collidershape.md) </td><td> _(Optional)_ The preferred shape to use for the collider. </td></tr> </tbody></table> **Returns:** [ColliderOptions](./server.collideroptions.md) The collider options object.