- Home /
Position Error in p30 lite - android 10
Hello I'm have this problem only in Huawei p30 lite - Android 10. In others mobiles works correctly. I'm calling an API that have the position, rotation and scale values. Rotation and scale works fine, but the position not. Here is my code
foreach (JSONNode data in environment["player"])
{
Vector3 pos = new Vector3(float.Parse(data["position"]["x"]), float.Parse(data["position"]["y"]), float.Parse(data["position"]["z"]));
spawnPosition = pos;
Vector3 rot = new Vector3(float.Parse(data["rotation"]["x"]), float.Parse(data["rotation"]["y"]), float.Parse(data["rotation"]["z"]));
Vector3 sca = new Vector3(float.Parse(data["scale"]["x"]), float.Parse(data["scale"]["y"]), float.Parse(data["scale"]["z"]));
_player.transform.position = pos;
_player.transform.localRotation = Quaternion.Euler(rot);
_player.transform.localScale = sca;
}
the position in the json is inside the room. In others smartphones works fine, but in p30 lite is wrong, any idea for that?.
Comment
Your answer
Follow this Question
Related Questions
how to scale and position guiText in android 1 Answer
Open PDF in Android (API level >=26) 0 Answers
Translate Vector3 by Vector3 1 Answer
Figure Where Keyboard ends. 1 Answer
Convert gameObject position on screen 0 Answers