Going further
There are a few ways we could further improve on what we've done here:
- First, detecting grabbable objects by distance gives us fuzzy results. It doesn't take the object's size into account. Using a sphere to represent our grabbing hand and testing for overlaps against this sphere is going to give us more accurate results. If you'd like to refactor this code to use that method, the VR Template project contains a good example.
- Second, our haptic feedback effect feels indistinct. It fades in and out evenly, and doesn't provide much of a physical sensation. Editing those curves to provide a sharper attack could make the effect more convincing.
Â
Â