#ROTATE AND SPIN WHEELS CAR

1 messages · Page 1 of 1 (latest)

worthy dock
#
 void Steering(Transform Tire, Transform wheelMesh, float speed =3000f)
    {

        float carVelocity = Vector3.Dot(Tire.forward, rigidbody.velocity);

        Tire.localRotation = Quaternion.Euler(Tire.localRotation.x, Tire.localRotation.y + accesx * SteeringAngle, Tire.localRotation.z);
        wheelMesh.localRotation = Quaternion.Euler(wheelMesh.localRotation.x, wheelMesh.localRotation.y + accesx * SteeringAngle, wheelMesh.localRotation.z);
        // RotateSteeringAngle(wheelMesh);
        TireSpeening(carVelocity , wheelMesh);
}
    void TireSpeening(float Speed, Transform Tire)
    {
        float RotationAmount = (Speed)*0.5f * 360f * Time.fixedDeltaTime;

      Tire.Rotate(Vector3.left, 0);

    }
#

this my code

worthy dock
#

@weak agate this my post

weak agate
#

so steering and wheel spin doesn't work when they happen together?

#

what does your hierarchy look like?

#

I would also change your question title to something more descriptive

#

That way people will actually know what you are asking

#

Everybody here wants help

worthy dock
worthy dock