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

Trigger works in Editor, Android and iPhone but not on iPad, and i have no idea how to debug this

Discussion in 'Physics' started by Aladine, May 1, 2021.

  1. Aladine

    Aladine

    Joined:
    Jul 31, 2013
    Posts:
    195
    Hi,

    This is the expected behavior (which works fine in the Editor, Android, and iPhone):


    So basically when the dragon enter the trigger boxCollider of the canon, the canon aim at it and shoot:



    The code:
    Code (CSharp):
    1.  private void OnTriggerEnter(Collider other)
    2.     {
    3.         if (other.CompareTag("Player"))
    4.         {
    5.             if (cAiming.enabled == false)
    6.             {
    7.                 cAiming.enabled = true;
    8.                 cAiming.StartAiming(other.transform);
    9.             }
    10.          
    11.         }
    12.     }
    13.  
    14.     private void OnTriggerExit(Collider other)
    15.     {
    16.         if (other.CompareTag("Player"))
    17.         {
    18.             cAiming.StopAiming();
    19.         }
    20.     }

    And this is what happens on iPad:


    basically nothing, and there is no errors or warnings related to this whatsoever.

    Unity version: 2019.4.12f1

    Currently i can only think of updating unity and hope for the best, but maybe this is a known issue ?

    Thanks!
     
  2. rubcc95

    rubcc95

    Joined:
    Dec 27, 2019
    Posts:
    222
    No idea how to help, but who cares canyon, this is so beautiful that the gameplay is in the background ... it does not matter that you do not fire the cannon with how cute the dragon is ^^

    (Hope someone could help you, cheers!)