Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Collision with trigger?

Discussion in 'Scripting' started by hellpirat, Aug 21, 2015.

  1. hellpirat

    hellpirat

    Joined:
    Jun 12, 2015
    Posts:
    26
    Hello, everyone.
    I have many prefab with script on spawn them. They all have Box Collider or Circle Collider. Some of them with a trigger and when they spawn they appear on each other. I need them to repel a little aside.
    How can I do this?
     
  2. Ncon123

    Ncon123

    Joined:
    May 6, 2015
    Posts:
    25
    If by repel you mean bounce off?
    Add a rigidbody using gravity and make sure Is Kinematic is NOT ticked.
    hope this helps!
     
    hellpirat likes this.