UNPKG

hytopia

Version:

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

62 lines (30 loc) 1.02 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCamera](./server.playercamera.md) &gt; [setTargetPosition](./server.playercamera.settargetposition.md) ## PlayerCamera.setTargetPosition() method Sets the position the camera will continuously look at. Use for: fixed focal points in the scene. **Signature:** ```typescript setTargetPosition(position: Vector3Like | undefined): 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) \| undefined </td><td> The position to track, or undefined to stop tracking. \*\*Requires:\*\* Player must be in a world. \*\*Side effects:\*\* Emits `PlayerCameraEvent.SET_TRACKED_POSITION`<!-- -->. \*\*Category:\*\* Players </td></tr> </tbody></table> **Returns:** void