Best way to detect tilt using MPU6050

I want to make a gesture controlled car. I want to know the best way to detect tilts using this IMU. Should I use gyroscope readings and calculate angular displacement? Or measure angles in the x,y,z plane. I tried the example sketch that produces raw values but I don't really understand it!Please tell me how I should approach this.

If you arrange the IMU so that Z is approximately down, in the YZ plane

float tilt_angle = 180.*atan2(accy, accz)/PI;

Explained here among other places: How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing-DFRobot