|Node|UserNode| The user node to check distance from.
|Node|'''[[Component:UserRoot#UserNode|UserRoot.UserNode]]'''|TypeAdv0=true| The user node to check distance from.
|Distance|Float| The distance to use when checking near vs far.
|Distance|Float| The distance to use when checking near vs far.
|TargetField|{{RootFieldType|FieldDrive`1|T}}|TypeAdv2=true| The field to drive with either <code>NearValue</code> or flip to <code>FarValue</code> depending on distance.
|TargetField|{{RootFieldType|FieldDrive`1|T}}|TypeAdv2=true| The field to drive with either <code>NearValue</code> or flip to <code>FarValue</code> depending on distance.
|NearValue|'''T'''|TypeAdv3=true| The value to use to drive <code>TargetField</code> with when the local user <code>Node</code> under <code>Distance</code> away from this component's slot in global space.
|NearValue|'''T'''|TypeAdv3=true| The value to use to drive <code>TargetField</code> with when the local user <code>Node</code> under <code>Distance</code> away from this component's slot in global space.
|FarValue|'''T'''|TypeAdv4=true| The value to use to drive <code>TargetField</code> with when the local user <code>Node</code> over <code>Distance</code> away from this component's slot in global space.
|FarValue|'''T'''|TypeAdv4=true| The value to use to drive <code>TargetField</code> with when the local user <code>Node</code> over <code>Distance</code> away from this component's slot in global space.
Latest revision as of 22:39, 17 March 2025
Component image
User Distance Value Driver`1 component as seen in the Scene Inspector
The UserDistanceValueDriver switches or flip flops or flips between two different values like a conditional or ternary operator when a user is close to or far away from the slot this component is on. The switch is local.
The field to drive with either NearValue or flip to FarValue depending on distance.
NearValue
T
The value to use to drive TargetField with when the local user Node under Distance away from this component's slot in global space.
FarValue
T
The value to use to drive TargetField with when the local user Node over Distance away from this component's slot in global space.
Usage
Attach to a slot that a distance to the local user for a particular slot in global space needs to be checked for. Then provide values for all the component's fields in order for it to work.
Examples
Can be used to activate a nameplate visual when the user is close, so the activation based on distance stays local.