Tiger Fat
Tiger Fat

Reputation: 1

About oculus quest Raycasting

I want to get "Raycast Hit UI elements" in My Oculus Quest Project. So I used OVRRaycaster component of Oculus Intergration Asset. but I couldn't find any method about GetRaycastHitData.

/// <summary>
/// For the given ray, find graphics on this canvas which it intersects and are not blocked by other
/// world objects
/// </summary>
[NonSerialized]
private List<RaycastHit> m_RaycastResults = new List<RaycastHit>();

I found m_RaycastResults in OVRRaycaster.cs but i can't access. How can I get RaycastHit Objects or Current RaycastHit Object in Oculus Quest Project? Should I make new Ray Method Or Not?

Upvotes: 0

Views: 1355

Answers (1)

Xander
Xander

Reputation: 447

My advise here is to avoid OVR components by just completely skipping the Oculus Integration Asset, and instead, basing your project on OpenXR API. The reasons are simple:

  • Oculus recently announced full OpenXR support on their devices while also rejectig self-developed API
  • there is gorgeous XR Interaction Toolkit developed by Unity, that is capable of what you want (raycasting against UI), and a lot more over it

Upvotes: 1

Related Questions