09-14-2022 08:03 AM
Hello,
I'm trying to get the poke interactor to only poke buttons when pointer finger is extended (otherwise I have lots of accidental pokes). I'm using the CustomHandLeft and CustomHandRight prefabs. I did a little workaround with a script that turns off the "Controller Pointer Pose" component when the hand collider is not active, but I noticed there is an optional "Active State" and "Interactable Filters" inputs in the ControllerPokeInteractor script component. When I search the script, I don't see anything related to "Active State" or "Interactable Filters" and I can't find anything (or maybe don't understand) in the documentation. It feels like I made a workaround for something that is already implemented (and probably implemented better than what I did). Any help is appreciated.
04-12-2023 04:37 AM
For anyone wondering what "Interactable Filters" do and who, like me, could only find this question when searching on the net (the lack of detailed documentation on the components of the Oculus Interaction SDK is appalling), here's what I found out by digging in the source code:
An Interactable Filter is basically an interface (its exact name is IGameObjectFilter), which has a single "Filter" method taking a GameObject as parameter and returning a boolean value saying whether the object can be interacted with or not with the interactor. Two implementations of that interface are provided: SecondaryInteractionFilter and TagSetFilter. The one you might want to use to specify which specific objects a HandGrabInteractor can interact with is the latter. You need to add TagSet and TagSetFitler scripts to the Interactable objects you want to filter for and define tags (which are just strings, not GameObject tags). Then, you add your Interactable object to the "Interactable Filters" list in the HandGrabInteractor and it will only interact with those objects.
You can of course create your own implementation of IGameObjectFilter with the rules that you want if tags don't fulfil your requirements.
10-02-2023 06:51 AM - edited 10-02-2023 06:53 AM
Ty man!
I have to specify you should add TagSet on your interactor or interactable GameObject (where you have the script) and the TagSetFilter on the object this one should interact and insert this in the "interactable/interactor filters" field.
11-22-2024 06:41 AM
I have been pulling my hair out trying to get this to work, I think I have tried every combination possible.... Are you able to provide a step by step guide or screen shots of what it should look like please? I am using interactable objects and snap locations and just want certain object to be able to snap to certain snap locations.
yesterday
almost any post i see on this topic is always not clear enough to understand