LogoLogo
HomeDiscordVideo TutorialsBuilder Opportunities
  • Welcome to MONA
    • What is a Space?
    • Unity Overview
  • ⬛Create
    • Getting Started Building
    • MONA Crash Course
      • Setting up MONA in Unity
      • Introduction to Unity
      • Setting up Simple Assets
      • Metaverse / WebGL Limitations
      • Creating 3D Assets
      • Applying Materials & Unwrapping UVs
      • Importing Assets into Unity
      • Adding Colliders
      • Adding Lighting
      • Adding a Custom Skybox
      • Setting up Canvases
      • Uploading to your Wallet
    • Building Spaces
      • Space Limitations
      • Create your Space
        • Space Overview
        • Colliders
        • Materials
        • Portals
        • Canvases
        • Artifacts
        • Add a Custom Skybox
        • Test Your Space
        • Troubleshooting
      • Improve your Space
        • Lightmaps (Unity Lightmapper)
        • Light Probes
        • Reflection Probes
        • Animation in Unity
        • Importing Animation
        • Player Property Volumes (PPV's)
        • Warp Volumes
        • Adding Audio
        • VRM Switcher
        • Custom Canvases
        • Embedded Video
        • User Interface (UI)
        • Creating Custom Shaders
        • Imported Assets
        • Lightmaps (Bakery Asset)
      • Optimise your Space
        • Prefabs
        • 3D Asset Specs
        • Optimizing your Space
      • Adding Interactivity
        • Visual Scripting
          • Web Request Node
        • Mona Reactor
          • Creating Animation
          • Using Animator
          • The Reactor Component
          • Reactor Overview
      • MONA Tools
        • Template Utility
        • MONA Capture
        • Light Probe Generator
        • VOX Importer
      • Submit Your Space
        • Submitting your Space
        • Creating an Image & Video Preview
        • QA Process
        • Mint Your Space
      • Update your Space
      • Frequently Asked Questions
      • Troubleshooting
    • Creating Assets
      • Asset Requirements
      • 3D Asset Types
      • Asset Creation Approaches
      • Optimizing your Mesh
      • GLB Considerations
      • Example - Cyberpunk Car
    • Creating Avatars
      • Getting Started with VRM
      • VRM Requirements
      • VRM Creation
        • Using Mixamo for Rigging
        • Adding Custom Bones to the Rig (Optional)
      • Creating your Avatar using UniVRM
        • Importing UniVRM into Unity
        • Creating the VRM using UniVRM
        • Adding Spring Bones in UniVRM (Optional)
      • Creating your Avatar using 'VRM for Blender'
        • Adding 'VRM for Blender' into Blender
        • Using 'VRM for Blender' for Rigging
        • Adding a Material
        • Assigning VRM Details
        • Exporting the Avatar
      • Uploading your VRM
      • Using Avatars in WebAR
      • Submitting your VRM to the Mona Marketplace
      • Mint Your Avatar
      • Troubleshooting
    • Resources
      • MONA Claim Asset Requirements
      • Unity Wallet SDK (Alpha)
      • MONA Playground
      • MONA Tutorials
        • Retrowave Modules
      • Asset Resources
        • 3rd Party Assets
        • Textures
        • Shaders
        • 3D Assets
        • Audio
        • Tools
        • Tutorials
      • MONA Library
        • MONA Library Submission
      • Useful Unity Packages
      • Updating the Template SDK
      • Importing Mozilla Hubs Spaces to MONA
      • Importing AltspaceVR spaces to MONA
    • MONA Marketplace
  • ⬛Explore
    • How to Use MONA
    • Using VRM Avatars
    • Audio Settings
    • Explorer's Frequently Asked Questions
  • ⬛Collect
    • Setting up a wallet
      • Delegating a Wallet
    • Own a Space
      • Host an Event
      • Uploading your Images
      • Add Images to a Canvas
      • Live Music Feed
      • Token Gated Access
      • Minted 3rd Party Assets
    • MONA Create
      • Create FAQ
    • Live Streaming in MONA
      • Setting up OBS Studio
      • Livestream using OBS Studio
      • Livestream using a Mobile Device
      • How to Stream Using Twitch or YouTube
      • Add a Livestream to a Canvas
    • Collector's Frequently Asked Questions
  • General Resources
    • Web3 Introduction
    • How to sell Art in Web3
    • Game Dev Glossary
    • Buildathons / Challenges
      • 3D Asset Buildathon (Current)
        • Frequently Asked Questions
      • Emote/Emoji Challenge (Completed)
      • Stream Challenge (Completed)
      • Custom Avatars (Completed)
      • Build : NY Challenge (Completed)
      • Sculpture Challenge (Completed)
      • Portal Hub (Completed)
      • Interact (Completed)
      • The Renaissance (Completed)
Powered by GitBook
On this page
  • Collider Types
  • Setting up Simple Colliders
  • Setting up a Mesh Collider
  • Summary

Was this helpful?

  1. Create
  2. MONA Crash Course

Adding Colliders

PreviousImporting Assets into UnityNextAdding Lighting

Last updated 1 year ago

Was this helpful?

If you don’t want your users to constantly fall through the floor or be able to walk through walls then you will need colliders. A collider is simply a component that makes assets ‘solid’ and unable to be moved through.

Collider Types

The simplest colliders are the box collider, Sphere collider, and Capsule collider. For more complex objects, you can use a Mesh Collider.

The box, sphere, and capsule collider are simple colliders and, therefore, much better for performance.

A mesh collider is more complicated and, therefore, slower in performance. However, there are ways to improve this, and we will go over that later in the tutorial.

Setting up Simple Colliders

  • Select the asset you would like to add the collider to.

  • Go over to the inspector and type the part of the component you want. ‘Box’ or ‘Collider’ is a good example.

  • Modify the collider with the ‘Edit Bounding Volume’ button here. It is also possible to edit the parameters directly if need be.

You can apply a collider on the asset itself or on an empty game object. Adding more than one collider component to an asset is also possible.

If you apply a collider to an empty game object, you can rotate it. Rotation is not possible on the component itself.

Setting up a Mesh Collider

You can add a mesh collider in the same way as other colliders by selecting the asset and adding the Mesh Collider component.

If you apply the Mesh Collider on an asset with a model, the mesh on the asset will be the collider. This is fine for simple objects, but if you have an asset with many polygons, you will want to make a simplified version of the asset so the space has less information to process.

You may also want a different mesh as a collider, such as a ramp instead of stairs, so moving up them will be a smoother experience.

For this, you must make a modified version of the same asset in your asset creation tool. The modified version is purely the collision detection and will not be visible. Make sure to reduce the polygons as much as possible for this.

Once imported into Unity :

  • Drag the mesh (not the asset) into the Mesh slot on the component.

    • Expand the asset in the Project folder, the mesh can be found with a little grid next to it. The asset itself cannot be dragged into the mesh collider slot.

  • You can apply the mesh collider to an empty game object for more control over the asset.

If the Mesh collider doesn’t align with your main mesh, ensure both assets have applied the transform similarly and that the pivot is in the same location in your 3D Creation tool.

You may find that deleting and reapplying the mesh collider component will also work.

Summary

In this tutorial, you have looked at adding colliders to prevent your users from moving through the space's assets.

⬛
Adding Colliders in Unity Video