Class InteractLight
public class InteractLight : MonoBehaviour, IInteractable, IInteractableBase<FirstPersonController>, IPositionOverride
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourInteractLight
- Implements
-
IInteractableBase<FirstPersonController>
Properties
QueryPosition
Override the position of the query point (Point used for occlusion check)
public Vector3 QueryPosition { get; }
Property Value
- Vector3
ReticlePosition
Override the position of the reticle (Dot in screen center + title)
public Vector3 ReticlePosition { get; }
Property Value
- Vector3
Methods
Awake()
public void Awake()
GetTitle(FirstPersonController)
Returns the title shown when player looks at the object. Run any custom logic here to determine the title. Returning null will exclude this object from showing up.
public string GetTitle(FirstPersonController player)
Parameters
player
FirstPersonControllerReference to the interacting playerComponent
Returns
- string
Title to show when looking at object
OnInteract(FirstPersonController)
Called when player interacts with the object.
public void OnInteract(FirstPersonController player)
Parameters
player
FirstPersonControllerReference to your playerController object.