Posted November 28, 2023 by melanzue
##bug
Hello!
Finally! I've found the reason for the game-breaking bug that haunted me for a month. This bug would appear whenever I wanted to teleport the player to some desired position, but sometimes randomly, and only in the build the player stayed in the same place. Turns out that in Unity if a GameObject has a CharacterController component and I would try and change its position with 'transform.position' the CharacterController would override the new position. So the solution was to just disable CharacterController when I want to teleport the player! I can't believe it took me this long to fix it but here we are!
Have fun!