Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Raycast from camera center rather than pointer?

Discussion in 'UGUI & TextMesh Pro' started by bakspace, Aug 23, 2014.

  1. bakspace

    bakspace

    Joined:
    Feb 5, 2013
    Posts:
    7
    In the documentation, info on Event Raycasters is rather sparse - I can't figure out if PhysicsRaycaster is meant to substitute the pointer as the focus of input from Graphic Raycaster or I need to actually do something with the input module. I want to use the center of the camera to control World Space GUI in a simple FPS - panels and buttons on every door, floor, roof; everything in beautiful interactive glory! :)
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,604
    I think you need a custom Input Module, rather than a raycaster - you want to feed in a custom pointer position (center of the screen).
     
  3. alexfeature

    alexfeature

    Joined:
    Apr 1, 2010
    Posts:
    132
    Hey,

    You could center pointer and lock it to the screen. Hence avoid all the headaches.
    At least in theory it sounds doable :)