camera mobning

This commit is contained in:
magn9775
2024-04-20 21:34:09 +02:00
parent 77dbe0b787
commit 9848674722
4 changed files with 99 additions and 53 deletions

View File

@@ -12,6 +12,7 @@ public class carcontrolv2 : MonoBehaviour
public float autoBrake;
public GameObject lookat;
public AudioSource audio;
WheelControl[] wheels;
@@ -108,6 +109,18 @@ public class carcontrolv2 : MonoBehaviour
// wheel.WheelCollider.motorTorque = 0;
}
}
//idk camera mobning rammer hårdt
float THINP = hInput/10;
if (THINP != hInput)
{
THINP+=hInput/10;
}
lookat.transform.localPosition = new Vector3 (THINP*1.5f,1,4);
}