Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to set collision order for OnTriggerEnter?

Discussion in 'Physics' started by Pascal81, Feb 24, 2024.

  1. Pascal81


    Jan 6, 2022
    Edit: Ok I found a bug in my script causing this problem -.-. My bad, sorry!

    I have a ship with a shield. The shield is on the Shield layer and the ship on the default layer.
    However, OnTrigger always triggers the ship model first, but of course I want the shield to be triggered first.

    I have tried the "Layer Override Priority" and set the shield layer to prio 1 but no success in game.

    I have also tried to set the shield in a layer above the ship layer but no success.

    How can I set the order for OnTriggerEnter so that the shield will be triggered first?
    Last edited: Feb 24, 2024