UNPKG

hytopia

Version:

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

58 lines (28 loc) 849 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [Audio](./server.audio.md) &gt; [setPosition](./server.audio.setposition.md) ## Audio.setPosition() method Sets the position of the audio. **Signature:** ```typescript setPosition(position: Vector3Like): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> position </td><td> [Vector3Like](./server.vector3like.md) </td><td> The position in the world. </td></tr> </tbody></table> **Returns:** void ## Remarks \*\*Detaches from entity:\*\* Setting a position clears any `attachedToEntity`<!-- -->. Audio can be position-based or entity-attached, not both.