hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
94 lines (44 loc) • 1.34 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [Collider](./server.collider.md) > [optionsFromModelUri](./server.collider.optionsfrommodeluri.md)
## Collider.optionsFromModelUri() method
Creates collider options from a model URI using an approximate shape and size.
**Signature:**
```typescript
static optionsFromModelUri(modelUri: string, scale?: Vector3Like | 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>
[Vector3Like](./server.vector3like.md) \| 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.
\*\*Category:\*\* Physics
## Remarks
Uses model bounds and heuristics unless `preferredShape` is specified.