Forum Discussion

izukingz's avatar
izukingz
Partner
9 months ago
Solved

Colliders of custom model

When I import a custom model which I exported as FBX from Unity. It seems to ignore the box collider I assigned to the object in Unity but instead assigns a mesh collider on the imported object. Is there a way to change this or make the object use box collider? Thanks

  • The ingestion is a little different in Horizon, since we can't import directly for Unity to transfer the collider components.

    A bottle, for example, would have a mesh that renders to the user. The collider would also be a mesh in the 3D modeling software of your preference (not a component), but by renaming this secondary mesh with one of the prefixes specified in the documentation, the Desktop Editor will ingest it as a collider (invisible to the eye, unless using the collider view, but selectable in the hierarchy).

    This is an example with a simple cube. This is how the mesh hierarchy looks in Blender, where the colliders are parented to the main mesh:

    And this is how it looks like the Desktop Editor after importing:

    Note that ingesting separate colliders is not a requirement; mesh colliders (importing the visual mesh only) are accepted too, but often expensive if the entity has a complex geometry. For ingested colliders what I've seen creators do is creating a decimated/low poly version of the mesh, and use it as the collider. 

    Also, basic collider gizmos are available under the Build menu (box, sphere, capsule). You can use these by making the visible mesh entity non-collidable in its properties (in the Desktop Editor), and then group it with the collider gizmo with an empty object. 

3 Replies

    • izukingz's avatar
      izukingz
      Partner

      I'm trying to import an object with a BOX collider, from what I understand from the doc, I have to name my object with UBX_name_##? I also renamed the mesh to be sure. But on importing in horizon, it does not have the box collider. What I am trying to achieve is if I enable physics on the object, to be stable on the ground instead of falling down to the side.

       

      • PigeonNo12's avatar
        PigeonNo12
        Partner

        The ingestion is a little different in Horizon, since we can't import directly for Unity to transfer the collider components.

        A bottle, for example, would have a mesh that renders to the user. The collider would also be a mesh in the 3D modeling software of your preference (not a component), but by renaming this secondary mesh with one of the prefixes specified in the documentation, the Desktop Editor will ingest it as a collider (invisible to the eye, unless using the collider view, but selectable in the hierarchy).

        This is an example with a simple cube. This is how the mesh hierarchy looks in Blender, where the colliders are parented to the main mesh:

        And this is how it looks like the Desktop Editor after importing:

        Note that ingesting separate colliders is not a requirement; mesh colliders (importing the visual mesh only) are accepted too, but often expensive if the entity has a complex geometry. For ingested colliders what I've seen creators do is creating a decimated/low poly version of the mesh, and use it as the collider. 

        Also, basic collider gizmos are available under the Build menu (box, sphere, capsule). You can use these by making the visible mesh entity non-collidable in its properties (in the Desktop Editor), and then group it with the collider gizmo with an empty object.