Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Physics Raycast is not working on ios

Discussion in 'Physics' started by alpahbeta2000, Mar 11, 2018.

  1. alpahbeta2000

    alpahbeta2000

    Joined:
    Sep 11, 2013
    Posts:
    9
    solved:those meshes are dynamic generated, the collider is updated only on editor.

    Hi
    I try to use raycast to pick up gameobject which has a collider enabled. it works on editor but not working on IOS build.
    I also draw the ray, it intersect with the gameObject.

    here is my code:
    Code (CSharp):
    1.         Ray ray = Camera.main.ScreenPointToRay(new Vector3(x, y, 0f));
    2.         RaycastHit hitInfo;
    3.         if (Physics.Raycast(ray, out hitInfo))
    4.         {
    5.             Debug.LogFormat("Hit {0}", hitInfo.collider.name);
    6.         }
    it there any clue?

    Thanks
     
    Last edited: Mar 13, 2018
    zkry-akgul likes this.
  2. zkry-akgul

    zkry-akgul

    Joined:
    Feb 20, 2016
    Posts:
    1
    I also have the same issue. Its working on android and editor but don't work on ios.
     
  3. kanersan

    kanersan

    Joined:
    Jul 13, 2012
    Posts:
    2
    I'm having the same problem. Was there any resolution to this?
     
unityunity