(One intermediate revision by the same user not shown)
Line 1:
Line 1:
<languages></languages>
<languages></languages>
<translate>
<translate>
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=LookAtUserComponent.png
|Image=LookAtUserComponent.png
Line 7:
Line 6:
}}
}}
The '''LookAtUser''' component drives the rotation specified by <code>_rotationDrive</code> to point towards the user specified in <code>TargetUser</code>, or the Local User if <code>TargetAtLocalUser</code> is checked.
The '''LookAtUser''' component drives the rotation specified by <code>_rotationDrive</code> to point towards the user specified in <code>TargetUser</code>, or the Local User if <code>TargetAtLocalUser</code> is checked.
== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|TargetUser|User| The user to look at, unless ''TargetAtLocalUser'' is checked.
|TargetUser|User| The user to look at, unless ''TargetAtLocalUser'' is checked.
Line 19:
Line 19:
|_rotationDrive|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv8=true| ''Automatically Assigned'' - The FloatQ to be driven by this component.
|_rotationDrive|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv8=true| ''Automatically Assigned'' - The FloatQ to be driven by this component.
}}
}}
== Behavior==
== UserNode ==
{{Table EnumValues
|Root|0| Component orients to look at the user's root node (Usually user slot)
|Head|1| Component orients to look at the user's head node (Usually the top of the neck where the head bends.
|View|2| Component orients to look at the user's view point (camera view) only works in local, else will look at the local user regardless of other settings. This may be a bug.
}}
== Usage ==
Attach to a slot, and then specify fields. Sometimes the fields like rotation offset and around axis may not adjust orientation as desired. In most cases, simply adding a slot beside the object that should look at another object (EX a piston that is already oriented to look at its target at rest) and then parenting it will achieve the desired effect.
The LookAtUser component drives the rotation specified by _rotationDrive to point towards the user specified in TargetUser, or the Local User if TargetAtLocalUser is checked.
Automatically Assigned - The FloatQ to be driven by this component.
UserNode
Values
Name
Value
Description
Root
0
Component orients to look at the user's root node (Usually user slot)
Head
1
Component orients to look at the user's head node (Usually the top of the neck where the head bends.
View
2
Component orients to look at the user's view point (camera view) only works in local, else will look at the local user regardless of other settings. This may be a bug.
Usage
Attach to a slot, and then specify fields. Sometimes the fields like rotation offset and around axis may not adjust orientation as desired. In most cases, simply adding a slot beside the object that should look at another object (EX a piston that is already oriented to look at its target at rest) and then parenting it will achieve the desired effect.