@touchfar=n limits how far away the user can reach. Objects beyond the limit (1.5 m by default, or the distance given) can't be touched or grabbed. The spec calls it a synonym of @fartouch. In the code they are two separate behaviors: the viewer takes the smallest distance among all @fartouch and @touchfar restrictions currently in force.
@touchfar=<n|y>
@touchfar:<max_distance>=<n|y>
atof. With no option, 1.5 is used. Text that isn't a number gives 0.@touchfar and @fartouch are stored separately, @touchfar=y doesn't lift a @fartouch=n, and vice versa. Remove each with exactly the command that set it, including the distance option.canTouch() the reach check only applies to in-world objects, not to attachments. CoolVL applies it to attachments too.llOwnerSay("@touchfar:3=n"); // can reach up to 3 m
updateLimits() (RRInterface.cpp:6911-6922) sets mFartouchMax = min(getMin("fartouch"), getMin("touchfar")), where an empty option counts as 1.5 (RRInterface.cpp:974-1006). It is recomputed when either behavior is added or removed (RRInterface.cpp:1327-1334).canTouchFar() (RRInterface.cpp:6202-6214) returns true for HUDs, false under @interact, and otherwise compares the distance with mFartouchMax. Besides canTouch() (in-world branch, RRInterface.cpp:6189-6196), it is called for selection (lltoolselect.cpp:70-108), pie actions (lltoolpie.cpp:810-816) and hover tooltips (lltoolpie.cpp:1340-1350).canTouch() calls canTouchFar() before splitting attachments from in-world objects (mkrlinterface.cpp:7360-7364), so worn attachments, including other avatars', are subject to the reach limit. Marine applies it to rezzed objects only.This command works differently from RLVa's @touchfar; see the comparison.