Some time ago I posted a question about the unity 5 wheel colliders sinking into the ground.
I concluded that it must’ve been the rotation of the wheel collider that just looked outright wrong. I got my theory confirmed when I saw this posted on twitter: https://pbs.twimg.com/media/CAx-5OkWwAA0I18.jpg:large
You can see how my colliders looked when I asked the question back then:
Here’s mine now, after some deleting, editing and adding again:
WheelColliders always point in the “forward” and “down” direction as the rigidbody they’re attached to. The steerAngle value is relative to the rigidbody’s forward direction.
Are all your rotations 0,0,0 when not in play? You mention your parent, what about the rest? Ideally you will have 0 rotations for everything, including children. Ensuring that will make your life hella easier. Also make sure your pivots are centered, mainly for the wheels.
I dont believe COM will cause your particular issue.
Thank you for your reply. Not all things are 0,0,0. For example the forks are rotated 270. It’s been a pain in the *** to get it as it is now. The wheelcolliders are attached to a new gameObject which is placed at the wheel’s center
its more of a pain in the ass to work with non uniform angles imo. I know its easy to reset the pivots in 3dsmax. I assume it aint too difficult in blender. I would recommend the first thing you do is sort that out.
You’re god damn right. The thing is, Blender’s Y and Z axises are switched. I’ll try but it might take a while before I’m able to, so I’m still open for suggestions.
Its the same in 3ds max. If you reset the pivot, the default imported fxb will have a rotation of 90,0,0. The thing is, you can usually select all objects, reset, rotate, done. Its not hard once you figure it out.
Why might it take a while before youre able to? youll probably save yourself a massive headache if you can.
Incidentally, you can actually edit fxb files in Visual studio (surprisingly). Might have to be 2013 for it to work. I havnt tried resetting pivots using it, but I think you probably can (tbh I was just surprised when it opened)
heh all good. I end up resetting pivots a lot in models, so at some point teach yourself how to do it quickly, because its something you’re probably gonna end up doing a lot
I’ve been told that a recent version of Blender has a new experimental option at the FBX exporter that resets some transforms before exporting. I haven’t tried, so I can’t tell for sure if/how that would work.
Thank you for your reply! So does your script also have the ability to fix the rotation with .blend files? I really wanna be able to use the blend files, which I just find very useful.
I think my solution will be to rotate the entire thing 90 degrees.
My script fixes the rotations so when you set 0 degrees in Blender, it results in 0 degrees in Unity. Other angles are translated properly so the model in Unity looks exactly as it was designed in Blender.
Although by dragging in just the prefab I got the result I wanted. I’m going to try and copy all of the scripts, colliders and everything over to the new one I just created. Then I’ll see what the result will be.