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. Dismiss Notice

Question Transform position differs when publishing?

Discussion in 'Android' started by HungryCatGames, Oct 17, 2022.

  1. HungryCatGames

    HungryCatGames

    Joined:
    Jun 24, 2020
    Posts:
    40
    I've been working on a game and it was working good on the android device I was testing with. I went back and refactored the controls and on the PC it works fine. On the Android, tethered to the PC it works fine. Published to the device and the controls are working but my movement no longer works. I threw in some on screen debugging and determined that PC and tethered the coordinates of my character are what I expect (0, 2, 4, etc.) and the character starts at position 0,0,2. However when I Build and Run to the device the same debugging shows the character at 0,0,1.171904...

    Any reason why these two coordinate systems don't match? I would thing world position of 0,0,2 is 0,0,2 no matter what device you are running on. Apparently either it isn't or I'm missing something here.
     
  2. HungryCatGames

    HungryCatGames

    Joined:
    Jun 24, 2020
    Posts:
    40
    I figured it out. In case someone else runs into this...

    Parent object and child object both with the exact same name. When running in test and tethered it picks the top level and all works. When deploying to a device the run on the device takes the child object, which has differing coordinates from the parent. Renamed one of the objects and coordinates working again as expected.