- Home /
Why are these shapes deforming?
I am creating a Labyrinth-esque game as my first project and I am running into a slight problem. Here is the code that controls rotation of the plane: http://vpaste.net/dfKtX
Anyways, the problem occurs when I rotate the playingPlaneX, when rotating the playingPlaneZ it does not occur.
playingPlaneZ rotated, no rotation on playingPlaneX: http://i.imgur.com/3IrPNyU.png
playingPlaneX rotated, no rotation on playingPlaneZ: http://i.imgur.com/flQvc6l.png
The walls are setup as children of Playing_PlaneX, which is a child of Playing_PlaneZ. I would much rather prefer to use a shape made in Blender for my level, but for some reason my ball kept falling through the object when I decided to rotate it.
This is strange. Any chance you have a rigidbody on the individual pieces? Any chance you can put a package of your project on the net to take a look at? As for blender, you could model your object and then use empty child objects with box colliders for the physics.
I have a rigidbody on the Playing_PlaneX so that it can collide with the sphere (the sphere would just stop moving when it hit the plane without it). I'll upload a project of it in a second.
Here is an upload of the project folder: http://www.2shared.com/file/hf4Sx9iv/Labyrinth.html
Answer by Owen-Reynolds · Jul 30, 2013 at 08:36 PM
Does playingPlane X or Z have scale with x/y/z not all the same? That's the most common cause of odd deforms -- Child rotation with non-uniformly scaled parents.
A fix, if you need playingPlaneX scaled (10,1,5), for example, is to have playingPlaneX be an empty, scaled (1,1,1). Then give it a new child "planeXmodel" with the correct scale.
Your answer
Follow this Question
Related Questions
Set rotation in script like editor? 1 Answer
Rotation problem 1 Answer
Wheel Collider Rotation Problem 0 Answers
Problem With Mathf.Lerp 2 Answers
Problem with SSL CA cert 0 Answers