Hi All,
I’m extremely new to scripting in Unity and I was wondering if someone could help me with a probably rather simple problem. I am currently playing around with the alternative physics model within the vehicle tutorial here:
http://unity3d.com/support/resources/tutorials/car-tutorial
It doesn’t use the wheel colliders but rather has it’s own thing going on apparently.
I’d like to add a vehicle reflection via a 2nd car with a negative scale in Y etc. I’ve got it all working apart from mirroring the rotating wheels. I’ve written a little script which is nearly there (I believe) but the wheels aren’t continuesly rotating but are oscillating instead (180deg). It’s targeting the wheel model above btw.
CODE:
// The target we are mirroring
var target : Transform;
function Update () {
TargetRotationX = target.eulerAngles.x;
transform.rotation = Quaternion.Euler(TargetRotationX, 0, 0);
}
Any help is much appreciated.
Cheers,
Andy