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:
This is after rotating on the y axis:
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:
I also tried making the plane a cube, it didn't change anything.
Answer
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.
No comments:
Post a Comment