1
\$\begingroup\$

I have a GameObject with a mesh and a collider. When I rotate the object the mesh and the colider do not act the same way and when the GameObject is rotate 65 degrees on the z axis the mesh and the colider are no longer aligned. This must affect game play. I don't understand why this happens and how it is supposed to be fixed.

\$\endgroup\$
2
  • \$\begingroup\$ What type of collider? \$\endgroup\$
    – House
    Commented Oct 12, 2013 at 16:29
  • \$\begingroup\$ Its a Cube Mesh with a Box Collider \$\endgroup\$
    – Daarwin
    Commented Oct 12, 2013 at 21:50

2 Answers 2

3
\$\begingroup\$

I got it! The problem was that the GameObject that was not aligned with its colider was a child of another GameObject and that parent was scaled. When you dont have the scales (1,1,1) weird things happens to the children.

Solution is to create a root GameObject that never is scaled and then put children in it.

\$\endgroup\$
0
\$\begingroup\$

Out of the box this doesn't happen in my experience. I suggest to check if rotating it in design view has the same problem to rule out scripting effects. Most likely something is referencing the mesh and/or collider individually rather than just the GameObject.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .