Search Unity

How can I get a spotlight to follow the reticle?

Discussion in 'Daydream' started by pumpkinszwan, Jun 11, 2018.

  1. pumpkinszwan

    pumpkinszwan

    Joined:
    Feb 6, 2014
    Posts:
    214
    I'm trying to attach a spotlight (to act as a torch/flashlight) to my player's controller, and I want it to always shine exactly where the pointer/reticle is, like in the image below from the editor (the spotlight in the centre with the white dot representing the pointer/mouse).

    When I attach the spotlight to the controller (to act like the Daydream controller is the light source), the spotlight doesn't line up as expected with the laser and dot. I've tried making the light a child of the controller and of the laser. The spotlight and laser/pointer get more out of alignment the more you move the controller. It's as if the laser's position is altered without affecting the spotlight even though I set the spotlight as a child.

    The objects in question all have a scale of 1:1:1, and I have not changed any of the default values in the GvrControllerPointer prefab.

    Any ideas on how I can get the spotlight to always shine exactly in line with the Daydream controller laser?

     
    OfficialHermie likes this.