camera mobning
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user