Replies with the current maximum distance, in meters, between the camera and the avatar. This is the combined result of every @camdistmax and @setcam_avdistmax restriction, further tightened by any vision-sphere restriction (@camdrawmin, @camdrawmax).

Syntax

@getcam_avdistmax=<channel>

Return value

A number with six decimals (e.g. 3.000000), computed as follows.

  1. Take the lowest value among all camdistmax and setcam_avdistmax restrictions. A restriction without a value counts as 1.5. With none, the value is 1000000.
  2. If that is at least the effective camdrawmin distance, it becomes 0.75 × camdrawmin. If it is at least the effective camdrawmax distance, it becomes 0.75 × camdrawmax. This keeps the camera inside the vision spheres.

A value of 0 or less means the user is forced into mouselook.

Caveats

Examples

llOwnerSay("@getcam_avdistmax=-81234");
// listen(): if ((float)msg > 100000.0) => no effective maximum

See also

Implementation notes

Client differences

CoolVL guards both 0.75× adjustments with && mCamDistDrawMin < EXTREMUM / && mCamDistDrawMax < EXTREMUM (mkrlinterface.cpp 7560-7569). Its unrestricted reply is therefore 1000000.000000, where Marine's is 750000.000000. CoolVL never answers on channel 0.

Comparison with RLVa

This command works differently from RLVa's @getcam_avdistmax; see the comparison.