Barrel Roll with ApplyTorque?

So I’m making a stunt car game. I got the car moving, and there is a script that detects if its on the ground if not. If not on the ground, you can use your arrow keys to flip the car in different directions. One problem though,

This is my rotation code:

        if (!onGround)
        {
            //init
            float verticalFlip = 0;
            float horizontalFlip = 0;

            //get input
            if (isPlayer)
            {
                verticalFlip = verticalFlipSpeed * Input.GetAxis("Vertical");
                horizontalFlip = horizontalFlipSpeed * Input.GetAxis("Horizontal");
            }

            //flip
            rigidbody.AddTorque(transform.up * horizontalFlip);
            rigidbody.AddTorque(transform.right * verticalFlip);
        }

    }

It works great, but the vertical flip causes the car to flip like its on a turntable, instead of doing a barrel roll. Is there a way to make it rotate around its local z axis?

Here is the game so far:

https://drive.google.com/file/d/0B_rNU8P3lqBqZEIxWnh0eVZvbkE/view?usp=sharing

This was a stupid question. I just realized how to fix it, rotate around transform.forward. I feel silly now.

1 Like