(One intermediate revision by the same user not shown)
Line 4:
Line 4:
|Name=Auto Look At User
|Name=Auto Look At User
}}
}}
{{Quote|Transform math is difficult, so I just use parents to solve my problems|[[User:989onan|989onan]]}}
The AutoLookAtUser component can be used to make a slot rotate towards a given user or some user that is close to it.
The AutoLookAtUser component can be used to make a slot rotate towards a given user or some user that is close to it.
Line 26:
Line 27:
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.
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.
In Reality, Swing and Twist are a more complicated subject, and is best to just put a slot under this component's slot to apply offsets to the rotation.
<!--T:5-->
<!--T:5-->
Line 34:
Line 35:
<!--T:6-->
<!--T:6-->
== Related Components ==
== Related Components ==
* [[Component:LookAt]]
[[Category:Components:Transform:Drivers{{#translation:}}|Auto Look At User]]
[[Category:Components:Transform:Drivers{{#translation:}}|Auto Look At User]]
[[Category:Components{{#translation:}}|Auto Look At User]]
[[Category:Components{{#translation:}}|Auto Look At User]]
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 put a slot under this component's slot to apply offsets to the rotation.