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) ;
}
}