hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
60 lines (29 loc) • 1.03 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [PlayerCamera](./server.playercamera.md) > [setViewModel](./server.playercamera.setviewmodel.md)
## PlayerCamera.setViewModel() method
Sets a view model for first-person rendering.
**Signature:**
```typescript
setViewModel(viewModelUri: string | undefined): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
viewModelUri
</td><td>
string \| undefined
</td><td>
The model URI, or `undefined` to clear.
\*\*Category:\*\* Players
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
The view model is only visible to this camera's player and renders in place of the attached entity's model (e.g., first-person arms/weapon). Animations played on the attached entity automatically sync to this model if animation names match.