# Car diagonal facing

**URL:** <https://forum.kirupa.com/t/car-diagonal-facing/257235>\
**Category:** Uncategorized\
**Created:** [April 11, 2008, 3:26pm UTC](https://forum.kirupa.com/t/car-diagonal-facing/257235 "2008-04-11T15:26:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Pancake](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mr\_Pancake](https://forum.kirupa.com/u/Mr_Pancake)\
**Post date:** [April 11, 2008, 3:26pm UTC](https://forum.kirupa.com/t/car-diagonal-facing/257235/1 "2008-04-11T15:26:11Z")

</div>

hey i made a car, that moves in 8 directions. how do i make it, so if both up and right are pressed the car faces diagonal?

i got this:

if(Key.isDown(Key.RIGHT) && (Key.UP)){  
\_rotation=45;  
}

but it doesn’t work.
