- 24/06/2015 at 20:26 #3156Eric ChuParticipant
I am trying to make a game with the EyeX in Unreal Engine 4 and all had been good so far, but with further testing I saw that the function “Has Gaze Focus” for the EyeX actor will still activate if the gaze is in the direction of the actor regardless of other actors that are in the way.
It hasn’t really been a problem so far, but to minimize unexpected behaviours I would like to make sure that it doesn’t happen.
I’ve already played around with the collision settings a bit it but had no luck, I am unaware of exactly how the EyeX Plug-in determines the gaze focus (should probably read up on that).
Either way any help would be much appreciated.
Eric25/06/2015 at 13:50 #3163TemaranParticipant
Hello there Eric!
This is currently a major flaw in the SDK when working in 3D-games. It currently uses a series of spherecasts (to compensate for view frustum FOV) to determine focus. We are working on a much better solution at the moment, although I don’t think I can say for certain exactly when it will be in the public release.
Maybe we can send you a beta build with the better solution once we have one? Let me know if you would be interested in that.
I can’t promise that we will be able to send one, but I can try to ask!
In the meantime there are a few things you can do to tackle the problem. The most straightforward way would be to linetrace yourself at the gazepoint using https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/index.html
This would guarantee that objects behind world geometry will not be transparent to the focus system. There is a major problem with this though as it does not compensate for accuracy/precision errors. To compensate for those you would have to linetrace in a lattice, and doing that would be both expensive and have the potential to miss smaller objects depending on lattice resolution and distance to the object.
The second approach you can take is to sort your results from the focus system in Z order relative to the camera. This will still report targets that are behind world geometry however (unless you have created a lot of occluders) and also does not work well with partially occluded interactors etc. This also suffers from the convex “joints” that appear when using the spherecast solution, so it still does not guarantee that objects that are in the foveal area ends up in the focus collection.
If you have very large objects and you have a lot of world geometry that acts as occluders, I would recommend using a line trace. If you just want a quick fix, z-sort the focus collection.
In any case, we will try to get you the perfect solution to the problem as soon as we can get all the pieces in place 🙂
- You must be logged in to reply to this topic.