Repository navigation
A3D_GetActorsOnScreen
imshooter edited this page Oct 17, 2026
·
1 revision
Find the actors on the screen of a player, nearest first, in the same virtual world.
native A3D_GetActorsOnScreen(
playerid,
actors[],
size = sizeof (actors),
bool:sight = false,
Float:range = 300.0
);| Parameter | Description | Default |
|---|---|---|
playerid |
Player whose screen it is. | |
actors[] |
The actors found. | |
size |
Room in actors. |
sizeof (actors) |
bool:sight |
Whether the camera must see them, with the map and static objects in the way. | false |
Float:range |
How far from the camera to look. | 300.0 |
- The number of actors written.
An actor shows when their chest lies on the screen, within range of the camera, in the same virtual world. Actors have no interior. With sight, actors behind the map or a static object are left out too.
The actors a player looks at turn to face them.
stock FaceViewer(playerid) {
new
Float:x,
Float:y,
Float:z,
Float:actorX,
Float:actorY,
Float:actorZ,
actors[8],
count = A3D_GetActorsOnScreen(playerid, actors, .sight = true, .range = 20.0)
;
GetPlayerPos(playerid, x, y, z);
for (new i; i != count; ++i) {
GetActorPos(actors[i], actorX, actorY, actorZ);
SetActorFacingAngle(actors[i], atan2(actorX - x, y - actorY));
}
}- A3D_GetPlayersOnScreen: Find the players on the screen of a player, nearest first, in the same virtual world and interior.
- A3D_GetActorsInCone: Find the actors inside a cone, such as the view of a guard, nearest first.
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