Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
praguevara's avatar
praguevara
Honored Guest
2 years ago

How can I attach a SnapInteractor in code so that it doesn't get pushed?

When a snap interactor snaps to a snap interactable "by hand", it doesn't get pushed by other objects until it unselects. However, when I try to do it through code, I can push it with other objects.

This is how I select it with code:

        glassInteractable.AddSelectingInteractor(glassInteractor);
        glassInteractor.Select();


In the Debug view in Unity, I can see that the Grabbable's Points list is empty. When I snap it by hand it has one element. Maybe it's relevant.

Thanks for any help.

1 Reply

Replies have been turned off for this discussion
  • Any chance you got this working? My build crashes every time I try to execute this code...