{"name":"isOnRoad","title":"isOnRoad","type":"command","url":"https://community.bistudio.com/wiki/isOnRoad","revid":377415,"updated":"2026-01-02T06:45:20Z","groups":["Roads and Airports"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"argument":"global"},"description":"Checks if given position is inside road segment. Same as roadAt, only return is boolean instead of road object.","syntaxes":[{"syntax":"isOnRoad position","params":[{"name":"position","type":"Object or PositionAGL (especially on bridges) or Arma 3 v2.00 Position2D, in which case Z will be automatically deduced as the height of the road surface","type_expr":"Object | PositionAGL | Position2D"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"position"}}],"examples":[{"code":["_objOnRoad = isOnRoad player;"]},{"code":["_posOnRoad = isOnRoad ASLToAGL getPosASL player;"]}],"see_also":["nearRoads","roadsConnectedTo","roadAt","surfaceIsWater","getRoadInfo","nearestTerrainObjects"],"notes":[{"user":"Tankbuster","date":"2017-11-24T21:31:00Z","text":"Some roadobjects will return false when using this command. invisibleroadway_square_f.p3d is found by the nearRoads command, yet will return false for isOnRoad."}]}