Why is my gameObject in a different position on galaxy s4?
i recently made a beta build of an infinite runner and gave copies to a few friends. All but one had no issue playing the game, however, one person using a galaxy s4 reported that the ground tiles were being destroyed when they reach the characters position. my ground tiles are 36 units and i have a destroy point gameObject that is tracked by a script. the object is attached to the camera so I'm not sure how it is going from out side of the camera view the the players position. any idea why this is happening?
EDIT: so it appears my object is not what is moving, its my camera offset. it seems as if galaxy phones have an issue with this script and sets the offset to a negative number, placing the camera behind the character.
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour {
[SerializeField]
GameObject player;
float offset;
// Use this for initialization
void Start()
{
offset = transform.position.x - player.transform.position.x;
//Debug.Log(offset);
}
// Update is called once per frame
void Update () {
transform.position = new Vector3 (player.transform.position.x + offset, transform.position.y,transform.position.z) ;
}
}
Answer by bonez9oh5 · Nov 19, 2018 at 12:51 PM
The issue was with unity, it's since been fixed through a unity update.
Your answer
Follow this Question
Related Questions
Saving, Loading and Editing levels of 2D Android Platformer (Now in SQLite) 1 Answer
[SOLVED] Ghost enemy AI that follows the player by copying the players position 0 Answers
snapping the Players psosition to another GameObject for a "Ledge grab" 0 Answers
Tetris grid 1 Answer
How to create a movement script for my person by controlling him by joystick 0 Answers