GSC reference › Built-in
GetNearestPathPoint()
Built-in (engine)
Server
Returns the nearest point on the navmesh for the given origin and radius or undefined if no point can be found.
Signature
GetNearestPathPoint(<origin>, <radius>)
Parameters
| Name | Required? | Details |
|---|---|---|
| origin | Required | The point from which to search from |
| radius | Required | The maximum radius in which to search |
Returns
Returns the nearest point on the navmesh for the given origin and radius or undefined if no point can be found.
Real uses in BO3's scripts
Called 2 times in the decompiled scripts. A few, zombies first:
- scripts/mp/gametypes/_prop_controls.gsc, line 1469
point = getnearestpathpoint(org1, 256); - scripts/mp/gametypes/_prop_controls.gsc, line 1480
point2 = getnearestpathpoint(org1, 50);
Related built-ins
- PointOnSegmentNearestToPoint()Given a line segment and a point P, this returns the point on the segment that is closest to P.
- GetClosestPointOnNavMesh()Get a point on NavMesh that's closest to the given position within radius.
- ConnectPaths()Connects the paths that intersect with the entity.
- DisconnectPaths()Disconnects the paths that intersect with the entity.
- PathMode()Set the path mode of this actor.
- HasPath()Returns true/false if AI has a path
- IsPointOnNavMesh()Checks if a given point is valid on the NavMesh.
- FindPath()Check if a path can be found between these positions.
- GetClosestPointOnNavVolume()Get a point on nav volume that's closest to the given position within radius.
- SetDemoIntermissionPoint()Sets the intermission point for the demos.
- GetWeaponMuzzlePoint()Returns the weapon's muzzle point
- ClearPath()Clears the AI's current path.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).