Search Unity

Selecting objects using Raycast

Discussion in 'VR' started by yashkesharwani37, Aug 2, 2019.

  1. yashkesharwani37

    yashkesharwani37

    Joined:
    Jun 25, 2019
    Posts:
    4
    Can someone please suggest any tutorial or link to use Vive controllers for selecting objects in play mode via a pointer/raycast?
     
  2. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    the standard physics raycast should suit your needs (this is how everyone is doing it) - you'll need to hook up a button to affect the object selected, so there is some coding, but it's nothing intense.

    The easiest way I've found is to make a collider trigger appear at the end of the ray.

    check out this guys youtube channel for a lot of info on this topic:

    https://www.youtube.com/channel/UCG8bDPqp3jykCGbx-CiL7VQ/videos