Forum Discussion
salvatore_cesarano
1 year agoHonored Guest
Multiple Snap Interactor for single object
Hello,
I am developing a scene in which the player builds an object with different Lego pieces.
I want to obtain a high level of realism, and for this reason I want to allow mistakes.
The player must be able to grab pieces from different poses, and I have achieved that with HandGrabPoses.
Now I am working at Interactions between pieces when they are built.
I am using SnapInteractor for pins and SnapInteractable for straight pieces with holes.
The user must be free to attach pieces from both sides, so I have added two different SnapInteractor, for each side of the pin.
The problem is that Unity only recognise one SnapInteractor, and always snap the pin at the same side.
The other SnapInteractor only works when the first SnapInteractor is disabled.
2 Replies
Replies have been turned off for this discussion
- hvox1138Protege
Hi salvatore_cesarano,
Do you already have your snap interactors in an interactor group? If not, does putting them in a `BestHoverInteractorGroup` lead to behavior more like what you're hoping for?
- salvatore_cesaranoHonored Guest
Thank you because I didn't know the BestHoverInteractorGroup.
Anyway it still doesn't work good. I've added the SnapInteractors as Interactors and I've also added a CandidatePositionComparer as a CandidateComparer (because I want it to snap the nearest SnapInteractor).
Anyway here I need to specify the CompareOrigin, while I want the system to calculate automatically distances to compare between the SnapInteractors and the current Interactable selected.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device