How to make a custom wheel collider ?

This is something i’m trying to get to grips with although at the moment I have no real reference on how to go about it.
I pretty much need the standard unity wheel collider however instead of the usual raycast replaced by a sphere cast in its place.
This will enable full surface collision with the wheel instead of the normal issues facing standard wheel colliders not working for wheelies or colliding properly with the environment.
Question is do I have to re write an entire new wheel collider system or is it possible to modify the existing system making use of the Physics.SphereCast function ?

I hadn’t noticed how old the question was until after I commented, it appears someone else wanted it reawakened!

Anyway, attaching a script like the one below to your wheel object will create a collider for it though it won’t have all the variables that a wheel collider exposes so you may have to code those yourself.

private var col : MeshCollider;

function Start () {
	col = gameObject.AddComponent(MeshCollider);
	col.isTrigger = false;
	col.sharedMesh = gameObject.GetComponent(MeshFilter).mesh;
	col.convex = true;
}

Personally I think your implementation of the sphere collider looks pretty good but maybe you will have problems if you want the bike to fall over.

Not sure if this will help, good luck!

Scribe