Skip to main content
Inspiring
August 22, 2016
Solved

How would you have an object Detect that you're looking at it?

  • August 22, 2016
  • 1 reply
  • 623 views
So that you can do actions to the object like grab it, toss it etc.
Like say a door knob.
if( Rift center of sight is looking stratight at me and user presses some button on the xbox controller)
       toggle lock or unlock door

****
But i want only the closest object to be affected, if there are object in the line of sight but are behind other objects that are in the line of sight, they shouldn't react to anything.


    This topic has been closed for replies.
    Best answer by CorvusVR
    Use colliders on the interactive objects and do a ray cast from the head.

    1 reply

    CorvusVRAnswer
    Inspiring
    August 23, 2016
    Use colliders on the interactive objects and do a ray cast from the head.