Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Oculus Crosshair Unity 3D

I'm having trouble to put the Script of OVRCrosshair that come with unity package to works, I posted answers.Unity comunity but nobody can helps me, I will post just the link here because it's much easier to see the compiled code:

Link to the question:

Answers Unity Question

Answers

  • Look at OVRMainMenu.cs for an example of how to use OVRCrossHair. Note that there are several methods you need to call:

    // On init
    Crosshair.Init();
    Crosshair.SetCrosshairTexture(ref CrosshairImage);
    Crosshair.SetOVRCameraController (ref CameraController);
    Crosshair.SetOVRPlayerController(ref PlayerController);

    //From Update:
    Crosshair.UpdateCrosshair();
    //From OnGUI:
    Crosshair.OnGUICrosshair()

    You can see how each of these methods is called in OVRMainMenu.cs

Sign In or Register to comment.