hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
88 lines (41 loc) • 1.21 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [PathfindingEntityController](./server.pathfindingentitycontroller.md) > [pathfind](./server.pathfindingentitycontroller.pathfind.md)
## PathfindingEntityController.pathfind() method
Calculate a path and move to the target if a path is found. Returns true if a path is found, false if no path is found.
**Signature:**
```typescript
pathfind(target: Vector3Like, speed: number, options?: PathfindingOptions): boolean;
```
## 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 pathfind to.
</td></tr>
<tr><td>
speed
</td><td>
number
</td><td>
The speed of the entity.
</td></tr>
<tr><td>
options
</td><td>
[PathfindingOptions](./server.pathfindingoptions.md)
</td><td>
_(Optional)_ The pathfinding options.
</td></tr>
</tbody></table>
**Returns:**
boolean
Whether the path was found.