using PrimeTween; using UnityEngine; namespace Code.Example.Race.Racer.Car { public class CarWheelRotatorPlayer : MonoBehaviour { [SerializeField] private Transform[] wheels; [SerializeField] private bool rotateDebug; public void RotateWheels(float amount) { // UnityEngine.Debug.Log("Rotating Wheels: " + amount); foreach (var wheel in wheels) { var wheelRotation = wheel.localRotation.eulerAngles; wheelRotation.y = amount; Tween.LocalRotation(wheel,wheelRotation, 1f); // wheel.localRotation = Quaternion.Euler(wheelRotation); } } } }