,Why is the same localPosition for two objects with the same parents showing up differently?
I'm fairly new to unity stuck on a problem to do with localPosition vs 'real world' position.
To illustrate my problem, I have:
Two anchor models, with the same position and rotation
Two cubes: respective children of the two anchor models
Cubes have the same localPosition (0,0,1)
Why are the cubes in completely different places? (see image)
I would have thought that if the two parents had the same position & rotation, then their children with the same localPosition would end up in the same position too.
here's the code I use to place the cubes:
// place a cube 1m forward of the 2nd anchor
var secondAnchorCube = Instantiate(CubePrefab, secondAnchor.transform, false);
secondAnchorCube.transform.localPosition = new Vector3(0, 0, 1);
// place a cube 1m forward of the 2nd model
var secondModelCube = Instantiate(CubePrefab, secondModel.transform, false);
secondModelCube.transform.localPosition = new Vector3(0, 0, 1);
@andrew-lukasik do you think that would change it so much? ie put them in complete opposite directions? odd, because I haven't touched the scale of either parent model..
Negative scale will flip local positioin like that. Idk what happened in your case, but this is easy to debug so you can figure that out
Your answer
Follow this Question
Related Questions
Markerless AR based on GPS 0 Answers
force a camera to be the main camera 0 Answers
Unity (Vuforia) doesn't recognize my PS Eye. 0 Answers
3D image is too large - Augmented reality 0 Answers
AR Camera shows only a black screen. 0 Answers