# Rotation and aiming help needed!

**URL:** <https://forum.makecode.com/t/rotation-and-aiming-help-needed/10760>\
**Category:** Help\
**Created:** [November 5, 2021, 4:08pm UTC](https://forum.makecode.com/t/rotation-and-aiming-help-needed/10760 "2021-11-05T16:08:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [November 7, 2021, 8:28pm UTC](https://forum.makecode.com/t/rotation-and-aiming-help-needed/10760/4 "2021-11-07T20:28:27Z")

</div>

Alright I think this is what you want:

> **[Aiming Test (fixed?)](https://arcade.makecode.com/61403-02649-94384-16873)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

What I did was that I kept the original image: (as a variable)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/934d9c8f2e9b9cb99f69e0f078cb2e8b73023f15.png)  
And then when I needed to change the rotation I would copy the image before rotating:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/798c9a0f76cc2883800462be5daa1fcec38e8854.png)  
This makes it slightly “better” so that 90, 180, 270, and 0 are nice and straight. Rotating an already-rotated image (how the sprite-transformation extension does it) “loses quality.”

Also, the moving doesn’t work cause the `set [sprite] velocity at angle [num] speed [num]` accepts **radians** although you were working in degrees. Thankfully, there is a block to convert degrees to radians. (And vice versa, since this extension works in radians, unlike the scaling extension which works in degrees) Also, to make it so that it moves in the direction of the head, you would subtract (or add) 180 degrees.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/54b77689b99d03f6c4aaeb9dd795b83fb5ea34e9.png)

And then I changed it so that pressing the left key subtracts degrees instead of adding degrees so it actually turns left instead of right and vice versa.

Code:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2184f27eedfac77a4e02b5f2f06d4b01056929d0.png)

---

_[View the full topic](https://forum.makecode.com/t/rotation-and-aiming-help-needed/10760)._
