.fbx rotation issues with blender leading to problems wheel colliders?

Hey guys, so I’m having some super frustrating issues with wheel colliders in unity, and I’m not sure what to do. I don’t know if the issue lies with the way I’m exporting my .fbx’s from blender, or if I’m just not understanding how wheel colliders work… I am using blender to export this vehicle model as an .fbx to unity.

-Vehicle model-
Imgur

I am following this tutorial…

-tutorial-

and am using these scripts uploaded by the tutorial author to control vehicle movement and wheel alignment.

-Scripts-
https://dl.dropboxusercontent.com/u/16956434/Car_Tutorial_Scripts/PlayerCar_Script.js
https://dl.dropboxusercontent.com/u/16956434/Car_Tutorial_Scripts/WheelAlignment_Script.js

My issues arise after the wheel colliders have been properly placed and the scripts have been attached to their respective meshes in Unity. As soon as I hit the play button and begin driving, the vehicles wheels (NOT the colliders, but the art wheels themselves) will not rotate along the correct axis. I can drive the vehicle, but the wheels are often pointing the wrong way, and spinning on the wrong axis, like in the image below…

-stupid wheels-
Imgur
(the art wheels are spinning along that axis, not just sitting at an angle)
Imgur
(also, notice the collider is functioning properly, but the art wheels aren’t)

I’d like to point out here that after trying this a couple times and getting frustrated, I did some research and realized that unlike Blender, where “UP” is the z-axis, both unity and the .fbx extension associate “UP” with the y-axis. I figured that this might have something to do with my wheel problem. So I did some MORE research, and came across this video detailing how to properly export .fbx’s from blender into unity.

-.fbx Rotation video-

In this video, the guy states toward the end that applying a -90 degree rotation on the X-axis in blender and then using ctrl+a to reapply the rotation values should fix the issue. I tried doing this, and it sort of worked, but now the wheels just spin on a different axis. I don’t know what’s going on.

The only thing I can possibly think of is that when I first create the wheel colliders, they appear 90 degrees perpendicular to my vehicle. I have to rotate each one 90 degrees on the Y axis so they are properly aligned with my wheels, but that doesn’t really make sense, as the issue is obviously lies with the orientation of the art wheels, and not the orientation of the wheel colliders.

I’ve searched for hours on the internet, trying to figure out what’s going on, and it seems like I only get fragmented answers. Any help you guys could offer would be fantastic. Thanks.

EDIT

Well, I just noticed this in unity. This is another vehicle, but is using the exact same scripts.


If you look at the above image, the X and Z axes of the collider, and the X and Z axes of the actual wheel are different. When I hit play on this, the vehicles tires turn in 90 degrees. How do I go about changing the local axes of on object within unity?

Problem solved. It was a mistake on our part. It came from us editing the script incorrectly. Feel free to delete this thread!