Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

The difference of OnTriggerEnter2D and OnTriggerEnter.

Discussion in 'Editor & General Support' started by takasuto, Jul 4, 2015.

  1. takasuto

    takasuto

    Joined:
    May 22, 2014
    Posts:
    6
    When you have been using your OnTriggerEnter2D,
    Also hit the object at the same time, the process once.

    But, OnTriggerEnter, when the object is hit at the same time, the number of times adds.

    Workaround?
     
  2. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Your posting does not compute.

    But to answer the question in the thread title: OnTriggerEnter2D() is for 2D physics, whereas OnTriggerEnter() is for 3D physics. You can't mix the two.
     
    pigears likes this.