class MAGES::LookAtObject¶
Overview¶
A simple component that makes the object look at an object. More…
class LookAtObject: public MonoBehaviour { public: // properties Transform Target; // methods LookAtObject Pivot(Transform pivot, float offset, float y); LookAtObject TargetObject(Transform target); LookAtObject ForwardVector(DirectionType forwardVector); LookAtObject Speed(float speed); LookAtObject Angle(float angleThreshold); };
Detailed Documentation¶
A simple component that makes the object look at an object.
Properties¶
Transform Target
Gets the target object to look at.
Methods¶
LookAtObject Pivot(Transform pivot, float offset, float y)
Sets the pivot object to look at.
Parameters:
pivot |
The pivot to rotate around. |
offset |
The offset from the pivot. |
y |
The y offset. |
Returns:
Self.
LookAtObject TargetObject(Transform target)
Sets the target object to look at.
Parameters:
target |
The object. |
Returns:
Self.
LookAtObject ForwardVector(DirectionType forwardVector)
Set the reference forward vector used for this gameObject.
Parameters:
forwardVector |
The forward vector. |
Returns:
Self.
LookAtObject Speed(float speed)
Sets the speed of the rotation.
Parameters:
speed |
The speed. |
Returns:
Self.
LookAtObject Angle(float angleThreshold)
Sets the angle threshold.
Parameters:
angleThreshold |
the angle threshold (in degrees). |
Returns:
Self.