Unity Basics
  • Welcome
  • Getting Started with Unity Software
  • Helpful Shortcuts
  • The Unity Software Interface
    • The Default Interface
    • The Windows (Tabs)
      • Hierarchy Window
      • Scene Window
      • Project Window
      • Inspector Window
      • Game Window
      • Console Window
    • Other Layouts
      • Create a Custom Layout
  • Create
    • Creating Game Objects
      • 3D Primitives
      • Creating Game Objects in the Editor
      • Spawning Objects
      • Unhiding/Hiding Objects During Gameplay
      • Parenting
    • Creating Assets
    • Creating Components and Scripts
      • Adding Components in the Inspector
      • Creating Custom Components and Scripts
    • Creating Prefabs
  • Select and Update
    • General Selection
    • Search and Focus
    • Updating Game Objects
      • Updating Game Objects in the Editor
      • Updating Prefabs
    • Updating Assets
    • Updating Components
      • Update Components in the Inspector
      • Accessing Components Through Scripts
  • Delete
    • Deleting Game Objects
      • Deleting and Disabling Objects in the Editor
      • Using the Destroy() Function
    • Deleting Components and Scripts
      • Disabling and Removing Components in the Editor
      • Disabling and Removing Components During Gameplay
  • Translate, Rotate, and Scale
    • Intro to Transforms
    • Handy Transform Shortcuts
    • Translate
      • Positioning Game Objects in the Editor
      • Updating Position Through Script Code
      • Using the Transform.Translate() Function
    • Rotate
      • Rotating Game Objects in the Editor
      • Updating Rotation Through Script Code
      • Using the Transform.Rotate() Function
    • Scale
      • Resizing/Scaling Objects in the Editor
      • Updating Scale Through Script Code
    • Controlling Speed
    • Common Issues with Transforms
  • Materials
    • Material Basics
      • Creating and Applying Materials
      • Accessing Materials Through Code
  • Physics
    • Physics Basics
    • Colliders and Triggers
      • Collider Component Overview
      • Accessing Colliders Through Scripts
      • Common Issues: Colliders and Triggers
    • Rigidbody Component
      • Rigidbody Component Overview
      • Accessing the Rigidbody Component Through Scripts
      • Common Issues: Rigidbody Components
    • Common Issues: Physics and Velocity
  • Interaction
    • Interaction Basics
    • Keyboard Controls
    • Mouse Controls
  • Coding Basics
    • Intro to Scripts
    • Variables
    • Conditionals (If / Then / Else)
    • Arrays
    • Loops
    • Functions
Powered by GitBook
On this page
  • Overview
  • Editing the Collider
  • Triggers
  • Physic Materials

Was this helpful?

  1. Physics
  2. Colliders and Triggers

Collider Component Overview

PreviousColliders and TriggersNextAccessing Colliders Through Scripts

Last updated 4 years ago

Was this helpful?

Overview

Primitives (shapes) usually have a Collider component by default based on their shape, but you will need to add them to other objects (including empty ones) if needed.

Editing the Collider

Click on the Edit Collider button to make the collider and handers visible in the Scene window.

Click and drag the green dots to adjust the size and shape or type in the values within the component in the Inspector.

Triggers

By default, the collider makes the object be treated as a solid object. Although the default shape and size are the same as the game object, this can be made larger and exist without the mesh, so objects will hit the collider and not go through.

Checking the Is Trigger checkbox turns the collider into a trigger, meaning other objects can go through the boundaries, but it can trigger other events.

Physic Materials

The Physic Material can be added to the Collider once it's made. Play around with the settings to get the effect you want.

When you , you can adjust the Bounciness and Friction of the collider.

Accessing Colliders Through Scripts
create a Physic Material asset
Example of a Box Collider component in the Inspector Tab
Example of a collider without a visible object
What appears in the Inspector Tab when a Phsyic Material is selected