What is the recommend way to prevent XR Hands from passing through walls?

Hopefully a simple question: What is the recommended way to stop hand visualizations from passing through walls or other geometries you don’t want them to pass through?

I see the poke interactor kind of have a version of this working where if you poke an interactable with a poke filter, it will briefly stop at the interactable, but will then poke through if you move your hand in far enough.

Plus I don’t want to have to add a poke filter to everything…

I’m thinking about Batman Arkham Shadow (made with Unity, right?) where hands will not pass through walls, no matter what. I realize you use controllers to play the game but in terms of stopping hand visualizations from passing through walls, I don’t see why controllers vs hands should matter.

bumpity bump bump

if you found anything please let me know

Hey @BlackPete and @devmaheswari2017,

There are a couple of strategies here. If it’s hand-based tracking that you want to modify, you can look at using a processor on the joint data as it comes through. There is another example of something similar for preventing Poke from going through buttons in the XR Interaction Toolkit. The script is called XRHandSkeletonPokeDisplacer and works by modifying the root wrist pose based on some threshold value. This only uses the PokeInteractor for positional input, but you could look at how this is done and drive it by other physics collisions.