0
\$\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\$
  • \$\begingroup\$ What type of collider? \$\endgroup\$ – MichaelHouse Oct 12 '13 at 16:29
  • \$\begingroup\$ Its a Cube Mesh with a Box Collider \$\endgroup\$ – Daarwin Oct 12 '13 at 21:50
1
\$\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.

| improve this answer | |
\$\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.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.