Pregunta

I'm trying to position some gameObjects relative to it's parent. I'm using localposition, but the gameObjects are not placed well. If I use local position the parent's width is considered to be 1, right? So if I have a plane unity3d considers it to be a 1X1 square.
I tried to put some models in the local position (1, 1) but they are not placed in the top right corner of the plane...
Do you guys have some thoughts of what might be the problem?

¿Fue útil?

Solución

You're incorrect: the parents' width is the x/y/z scale of the parent; local co-ordinates are still measured in world units. If your plane is 100x100 horizontally, and centred at 0,0,0 then you need to put the model to (50,0,50) to be at the corner.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top