I have made a simple script for prototype project. I made a tank and assigned tracks, The point is that the wheel meshes go to the middle of the object I guess. I have provided link to video for clearer example.
https://youtu.be/pV-JsGFY6JY
I've shortened down the script to one wheel
public WheelCollider wheel1R;
private Vector3 centre1R;
public GameObject wheel1MeshR;
private void Update()
{
centre1R = wheel1R.center;
}
private void FixedUpdate()
{
wheel1MeshR.transform.position = centre1R;
}
↧