- 10/05/2021 at 10:03 #20323
Hello, I am using HTC VIVE PRO EYE and I am trying to get when the users look at the ground in my game so, I added a script to my terrain with the IGazeFocusable but it never detects the focus. The terrain has a Terrain Collider so I suppose that maybe the gaze ray is not hitting with terrain colliders. Any help?
I am using the HTC VIVE PRO EYE hardware, SRanipal SDK 220.127.116.11 and TobiiXRSDK 18.104.22.168
Thanks!10/05/2021 at 13:09 #20325
After some research I reached the conclusion that the terrain is beeing discarded because in the function called “UpdateListOfFocusedCandidates” in “G2OM.cs” the score of my terrain is 0 so here:
if (candidate.score <= Mathf.Epsilon) break;the candidate is discarded. I don’t know where this score comes from but it seems to be my problem.12/05/2021 at 12:00 #20355
Hi @moreno, thanks for reaching out and providing us an update. As you may now be aware, Terrain Colliders are not supported in G2OM so you will need to add an actual collider to the objects you wish to investigate focus upon. Hopefully that makes sense, do let us know how you get on. Best Wishes.12/05/2021 at 12:04 #20356
But the terrain is being detected. The problem is that the score given to the terrain is 0. Is it 0 because of the terrain collider?14/05/2021 at 12:02 #20386
UPDATE: I found the function that check the colliders and I modified it so it also detects TerrainCollider. Now the problem is inside a dll function called “G2OM_Process”. That’s the function that is returning score 0 although now TerrainCollider is being detected. I can’t access to that .dll so I suppose that I can’t reach a solution to this problem.17/05/2021 at 12:49 #20395
Thanks for the update Jesus. Yes, as terrain colliders work different to regular colliders, I’m afraid that the G20M Process does not support this type. Depending on your design, you could replace with a regular object of appropriate size, but if you let us know what you are trying to do, we would be pleased to try and find a solution for your needs.17/05/2021 at 12:56 #20400
What I am trying to do this to detect when the user looks at the ground. I can’t use box collider due to the terrain orography but I am trying to generate a mesh with the terrain data so I can use mesh collider.
Thanks for the help.18/05/2021 at 15:18 #20410
OK, shame you can’t use a box collider as unfortunately that seemed that the best workaround we can propose. Any colliders you create on other geometries such as sphere, capsule or mesh will be converted by G20M as a box. Apologies we cannot offer a better solution, best wishes.
- You must be logged in to reply to this topic.