I'm not sure what's going on here. I have a cube which I have turned into a rectangle; it's a child of a plane which is the "ground" so that they share rotation (this is a pinball table).

To create these cubes, I just used the create => 3d shape => cube/plane option. No packages are used.

The issue is when I rotate the rectangle, the collider visibly becomes wrong.

This is before rotation:

enter image description here

This is after rotating on the y axis:

enter image description here

The collider does seem to rotate, but not at the correct amount. Can anyone shed some light as to what's going on here?

Here's the inspector and hierarchy:

enter image description here

enter image description here

I also tried making the plane a cube, it didn't change anything.

  • \$\begingroup\$ It looks to me like the parent transform has a non-uniform scale applied. Can you confirm? \$\endgroup\$ – DMGregory Sep 17 '17 at 20:18
  • \$\begingroup\$ sorry, i mean it is a non-uniform scale haha. the rotation only seems to break when i make it a child of the plane. \$\endgroup\$ – max pleaner Sep 17 '17 at 20:36
  • \$\begingroup\$ it's just position 0,-1,0 and scale 10,1,20 \$\endgroup\$ – max pleaner Sep 17 '17 at 20:37

It seems like the issue is that I cannot change the rotation on a child object when applying a scale to the parent.

In other words, when inheriting scale, don't use rotation.

I'm not exactly sure why this is the case but here's my takeaway. Apply the scale to the object which is being rotated, not to its parent.


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.