Search Unity

My Ray cast doesn't grab imported objects only objects used in unity

Discussion in 'AR/VR (XR) Discussion' started by ahaijaa1, May 5, 2020.

  1. ahaijaa1

    ahaijaa1

    Joined:
    Apr 15, 2020
    Posts:
    2
    Hello guys i have uploaded a video showing my unity interface and im trying to grab objects in the scene the code works well with objects created in unity but custom imported 3d objects created by me wont get grabbed why?
     
  2. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,933
    1. Have you attached the necessary components? (depends how you are doing your grabbing, there are many different ways - I have no idea which one you've chosen. Most of them require a correctly configured Collider (with all correct settings, layers, etc) and some require a RigidBody (again: correctly configured for your scene/usage).

    2. Are they setup properly? (e.g setting a Collider to IsTrigger will break most/all grabbing code, because of quirks of how Unity's custom physics layer works)