Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GUI elements using a ray cast...

Discussion in 'Scripting' started by ChaosGaming, Aug 31, 2011.

  1. ChaosGaming

    ChaosGaming

    Joined:
    Oct 26, 2010
    Posts:
    65
    Hi all,

    I am currently working on a simple space game in which you have a first person perspective and simply have to shoot objects.

    I am developing a custom cursor but I want to create a GUI similar to that of a game that I played, (But can't remember which one!), in which there are lines coming from four corners of the screen that meet at the point in which the cursor sits and follows the mouse.

    I wondered whether this would be possible by using a raycast of some sort, however I would not know how to do this within a GUI.

    Any help is greatly appreciated