If you want to rotate a raster sprite, then I'm afraid it's just as LuX said earlier. If you take every pixel, translate it so that it's position is now relative to your point of rotation, rotate it with the sin/cos transformation, translate the point again to get to screen coordinates, and plot it, you will get a sprite. However, it will look like utter garbage and there will be holes in it.
In order to do rotation nicely, you have to do a special (and simpler) case of texturing. I will be covering this after we finish the platformer game.
Rotation Problem
Re: Rotation Problem
Chili
-
- Posts: 3
- Joined: January 29th, 2013, 7:15 pm
Re: Rotation Problem
How would I go about rotating a square? haha
Re: Rotation Problem
Are you using the DrawLine() finction to draw between four points? Cause that's a lot easier than a bitmap.
Musi
There are 10 types of people that understand binary.
Those that do, and those that don't.
There are 10 types of people that understand binary.
Those that do, and those that don't.