Home › Forums › Software Development › Unreal Collsion › Reply To: Unreal Collsion
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.
tl;dr;
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 🙂
Best regards,
Temaran