m LogiX -> ProtoFlux, also added some stubs |
Add info on swing and twist. kinda |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=AutoLookAtUserComponent.png | |Image=AutoLookAtUserComponent.png | ||
Line 16: | Line 15: | ||
|AutoTarget|Bool| Whether or not the component should pick its own target. | |AutoTarget|Bool| Whether or not the component should pick its own target. | ||
|ExcludeActiveUser|Bool| If this is true and the slot with this component is parented to a user, it won't look at that user. | |ExcludeActiveUser|Bool| If this is true and the slot with this component is parented to a user, it won't look at that user. | ||
|SwingReference|Float3| | |SwingReference|Float3| The first axis in which to restrict rotation essentially. | ||
|TwistReference|Float3| | |TwistReference|Float3| The second axis in which to restrict rotation essentially, for best results, make this axis perpendicular to <code>SwingReference</code>. | ||
|MaxSwing|Float| | |MaxSwing|Float| How much this can rotate on the <code>SwingReference</code> axis. | ||
|MaxTwist|Float| | |MaxTwist|Float| How much this can rotate on the <code>TwistReference</code> axis. | ||
|_rotation| | |_rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv9=true| The rotation field to drive with this component's calculations. Usually this is the slot that this component is on. | ||
}} | }} | ||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
This can be used to make guards that look at the user when they get close. This can also be used to make UI or nametags that look at the user, or automated turrets. | |||
In Reality, Swing and Twist are a more complicated subject, and is best to just change the <code>MaxSwing</code> and <code>MaxTwist</code> values only until you are comfortable or learn how the reference axis's work. | |||
<!--T:5--> | <!--T:5--> | ||
== Related Issues == | == Related Issues == | ||
None right now. | |||
<!--T:6--> | <!--T:6--> | ||
== Related Components == | == Related Components == | ||
[[Category: | [[Category:Components:Transform:Drivers{{#translation:}}|Auto Look At User]] | ||
[[Category:Components{{#translation:}}|Auto Look At User]] | |||
[[Category:Components: |
Latest revision as of 22:30, 13 October 2024
Component image
The AutoLookAtUser component can be used to make a slot rotate towards a given user or some user that is close to it.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
RetargetDistance
|
Float | The distance that the current target needs to be from the slot for it to pick a new target. |
LerpSpeed
|
Float | The speed at which the slot rotates towards its target. |
TargetedUser
|
User | The user that the slot is currently looking at. |
AutoTarget
|
Bool | Whether or not the component should pick its own target. |
ExcludeActiveUser
|
Bool | If this is true and the slot with this component is parented to a user, it won't look at that user. |
SwingReference
|
Float3 | The first axis in which to restrict rotation essentially. |
TwistReference
|
Float3 | The second axis in which to restrict rotation essentially, for best results, make this axis perpendicular to SwingReference .
|
MaxSwing
|
Float | How much this can rotate on the SwingReference axis.
|
MaxTwist
|
Float | How much this can rotate on the TwistReference axis.
|
_rotation
|
field drive of FloatQ | The rotation field to drive with this component's calculations. Usually this is the slot that this component is on. |
Examples
This can be used to make guards that look at the user when they get close. This can also be used to make UI or nametags that look at the user, or automated turrets.
In Reality, Swing and Twist are a more complicated subject, and is best to just change the MaxSwing
and MaxTwist
values only until you are comfortable or learn how the reference axis's work.
Related Issues
None right now.