Search Unity

Resolved XR Interaction Toolkit (0.9.4) - Socket Interactor / Snap Zone only allow specific item to be placed

Discussion in 'XR Interaction Toolkit and Input' started by markasuter, Nov 13, 2020.

  1. markasuter

    markasuter

    Joined:
    May 20, 2019
    Posts:
    24
    I have a functioning socket, but it accepts any object placed into it.
    I want:

    1) When hovering ANY object in the snap zone, the translucent object should ALWAYS just be the desired object (It currently just shows a custom material version of the held object. Example, When I hold a fox in the zone, the zone shows a translucent fox. When I show a hotdog in the zone, it shows a translucent hotdog. It should ALWAYS show the fox, as a form of "training" the user

    2) In the snap zone/socket event "On Hover Enter"(or "On Select Enter") I want to fire my custom function that checks the tag of what you're trying to drop. If it's the desired one("fox"), it accepts the snap. If not, it should reject it. I can only get it to fire my Debug.Log the same message everytime regardless of what I hover in the snap zone. I'm using Debug.Log as I'm also not sure how to "disable" the snapping of a wrong object while still enabling the correct translucent hover model to train the user) See screenshots. foxsocket1.PNG IsItAFox.PNG
     
  2. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    335
    Hi @markasuter, great feedback. Can you formulate the above as feature requests in our public roadmap so we can properly track and consider in our plans. Thanks!
     
    markasuter likes this.