Turret rotation

Started by
21 comments, last by nobodynews 11 years, 3 months ago
Perhaps you could use a few Math classes. Are you in school? At what level?

nobodynews posted a very good guide to complex numbers that you should read.
Advertisement

Hey Alvaro, thanks for the sample and link on complex numbers. This is high school level stuff to me, but it's been so long since I've used it that I've now finally come to grips with it and it makes perfect sense for 2D rotations. Perhaps now I can get back to working on the rolling marble game I so much put off :D

New game in progress: Project SeedWorld

My development blog: Electronic Meteor

Well, the reason I use degrees is because the functions that rotates images wants the value to be in degrees and not radians. And radians is something I am unfamiliar with. I never really understood what radians tbh. I know it is a way to measure/represent angles, but thats about it. Wiki was not good at explaining it either.

A thing you should understand to help get radians is that the units for degrees are arbitrary. What is a degree defined as? 1/360th of a full rotation. Why use 360 instead of any other number? It's just so common we keep on using it. Once you learn it it's easy to use in conversation and it has more whole numbers than radians which are harder to talk about. Despite being harder to talk about, radians are more natural. They don't rely on an aribtrary definition like degrees do and as such they are easier to work with in the language of math. A radian is defined as the rotation around an arc that's the same length as the radius. This means the radian can be derived independantly for any circle you'll ever look at. The reason radians come up in trigonometry is because of the relationship between triangles and circles.

As you continue learning about trigonometry you'll gain a better understanding of radians.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

This topic is closed to new replies.

Advertisement