hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
90 lines (42 loc) • 1.34 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [SimpleEntityController](./server.simpleentitycontroller.md) > [move](./server.simpleentitycontroller.move.md)
## SimpleEntityController.move() method
Moves the entity at a given speed in a straight line to a target coordinate.
**Signature:**
```typescript
move(target: Vector3Like, speed: number, options?: MoveOptions): 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 move to.
</td></tr>
<tr><td>
speed
</td><td>
number
</td><td>
The speed at which to move to the target coordinate.
</td></tr>
<tr><td>
options
</td><td>
[MoveOptions](./server.moveoptions.md)
</td><td>
_(Optional)_ Additional options for the move operation, such as callbacks.
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
If this method is called while the entity is already attempting to move to another target, the previous target will be ignored and the entity will start attempting to move to the new target.