hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
90 lines (42 loc) • 1.32 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [SimpleEntityController](./server.simpleentitycontroller.md) > [face](./server.simpleentitycontroller.face.md)
## SimpleEntityController.face() method
Rotates the entity at a given speed to face a target coordinate.
**Signature:**
```typescript
face(target: Vector3Like, speed: number, options?: FaceOptions): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
target
</td><td>
[Vector3Like](./server.vector3like.md)
</td><td>
The target coordinate to face.
</td></tr>
<tr><td>
speed
</td><td>
number
</td><td>
The speed at which to rotate to the target coordinate.
</td></tr>
<tr><td>
options
</td><td>
[FaceOptions](./server.faceoptions.md)
</td><td>
_(Optional)_ Additional options for the face operation, such as callbacks.
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
If this method is called while the entity is already attempting to face another target, the previous target will be ignored and the entity will start attempting to face the new target.