This is a problem that making me go crazy! I did a car tutorial. Everything went great until i tried importing my own car model from 3D max. I applied the wheelcolliders and the script for turning the wheels, but when i start the game, the wheels rotate about the wrong axis. I know it's probably an issue with the pivot in the 3d Max but i tried centering the pivot for each wheel in Max, changing the upper axis (z or y) and it still won't rotate correctly. HELP! Much appreciated!
If it's not a pivot point problem. It might be that the script gets the wrong axis, have you tried to rotate another axis in your script.
In Unity a x0.y0.z0 model (rotation) from 3ds max gets imported as 270.0.0 by default. It is the Z-up applications that do that.
If it doesn't work make in unity four cylinders(with collision but no mesh renderer) that they always come with 0.0.0 rotation, apply the script there and put your wheels as children.As far as I know It is impossible to fix completely z-up models. I usually add unity "dummies" to do the work. I try to 'nest' the models under unity dummies. I don't know the tutorial you are talking about but keep in mind that the root object passes the transform to the children so if your root node has a 270 degrees rotation in X that will pass in the children. So you might need to put a unity node as root add the main body as a child, add 4 other unity objects as children of the root, that have the wheel meshes as children.
For static geometry it is OK but when things get more complicated like parenting, animating and rigid bodies I use these dummies to make things work.
answered Apr 20, 2010 at 10:47 AM
Did you model the wheels with the car? The wheels need to be modelled on their own with the origin point in the centre of the wheels and facing the right way for left and right wheels, at the moment the centre point is somewhere to the side of the wheel (the middle of the car probably) which is why the rotation is off centre.
Hope that helps
answered Apr 20, 2010 at 10:04 AM