Announcement

Collapse
No announcement yet.

How to interact with objects when they're in my crosshairs?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to interact with objects when they're in my crosshairs?

    I set up a crosshair on my viewport and i want the player to be able to interact with objects like pickups, doors, buttons etc. only when the crosshair overlaps with the object on screen.
    Can anyone please explain how i would go about doing this?

    #2
    Linetrace + interfaces.
    "I have harnessed the shadows that stride from world to world to sow death and madness."

    Comment


      #3
      Depending on the distance involved you could add a cone/capsule collision component to the character. Use it's overlap for interface events. The problem I see with line trace approaches is you have to fire a trace every frame (tick).

      Comment

      Working...
      X