Repository navigation
A3D_GetNearestWalkPoint
imshooter edited this page Oct 23, 2026
·
1 revision
Find the nearest point of the navigation mesh, where a pedestrian can stand.
native bool:A3D_GetNearestWalkPoint(
Float:x,
Float:y,
Float:z,
&Float:walkX,
&Float:walkY,
&Float:walkZ,
Float:reach = 3.0
);| Parameter | Description | Default |
|---|---|---|
Float:x |
Point on the X axis. | |
Float:y |
Point on the Y axis. | |
Float:z |
Point on the Z axis. | |
&Float:walkX |
Point of the mesh on the X axis. | |
&Float:walkY |
Point of the mesh on the Y axis. | |
&Float:walkZ |
Point of the mesh on the Z axis. | |
Float:reach |
How far to look across, in metres. Twice as far is looked up and down. | 3.0 |
-
truewhen the mesh is within reach. -
falsewhen it is not, or there is no navigation mesh.
The point is on a floor where a person of 1.8 metres stands, at least 35 centimetres from any wall, so an actor or a pickup put there stands free. reach looks that far across and twice as far up and down, so a point inside a wall or in the air above the floor finds the floor.
Puts an actor on the floor near a point.
stock CreateActorOnFloor(skin, Float:x, Float:y, Float:z, Float:angle) {
new
Float:walkX,
Float:walkY,
Float:walkZ
;
if (!A3D_GetNearestWalkPoint(x, y, z, walkX, walkY, walkZ)) {
return INVALID_ACTOR_ID;
}
return CreateActor(skin, walkX, walkY, walkZ + 1.0, angle);
}- A3D_GetRandomWalkPoint: Find a random point of the navigation mesh within a radius, which can be walked to from the centre, such as where an actor wanders next.
- A3D_WalkRayCast: Find where a straight walk between two points is stopped by a wall, a building, a ledge or the water.
- A3D_GetNearestPathPoint: Find the nearest point of a path a route can use, and the direction of the path there.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions