Tag Info

Hot answers tagged

3

First of all: most computer trigonometric functions takes radians as input. Even if the code worked, I am 99% sure it will not rotate by 90 degrees. So if it is that case, try changing it to pi/2. Secondly, if you would rotate by not-multiply of 90 degrees - the code would still produce axis-aligned rectangle (bounding box), NOT rotated rectangle as you ...


1

//temp helper variable var moveAmount = Point.Zero; if (InputHandler.KeyPressed(Keys.A) || InputHandler.KeyPressed(Keys.Left)) moveAmount.X -= 1; if (InputHandler.KeyPressed(Keys.D) || InputHandler.KeyPressed(Keys.Right)) moveAmount.X += 1; if (InputHandler.KeyPressed(Keys.W) || ...



Only top voted, non community-wiki answers of a minimum length are eligible