Need examples of spinning circle around an object.Unanswerd
Need examples of spinning circle around an object.Unanswerd
Hello everyone.I need to make a circle spin for one of my games I know how it might work. But I need some examples of a spinning circle sorce code.Any comments are appriciated. Thanks chili for all your hard work.
Last edited by cameron on August 10th, 2012, 2:52 am, edited 3 times in total.
Computer too slow? Consider running a VM on your toaster.
Re: Would like some help to make a circle spin.
How do you mean spin?
With like an image in the middle like a wheel or some kind of a physics thing or what? Be more specific.
Generally a blank circle is already "spinning", depends how you imagine it.
With like an image in the middle like a wheel or some kind of a physics thing or what? Be more specific.
Generally a blank circle is already "spinning", depends how you imagine it.
ʕ •ᴥ•ʔ
Re: Would like some help to make a circle spin.
Ok sorry Lux I mean i have a circle drawn and I want that circle to move around in a circle.In other word I want a circle to spin around an object.
Computer too slow? Consider running a VM on your toaster.
Re: Need examples of spinning circle around an object.Unansw
Like the moon circles around the earth?
Re: Need examples of spinning circle around an object.Unansw
Or like the sun circles around the earth?
...Wait what?
I think the answer can be found on multiple topics on planet chili, but it shouldn't be too hard to search from the web.
...Wait what?
I think the answer can be found on multiple topics on planet chili, but it shouldn't be too hard to search from the web.
ʕ •ᴥ•ʔ
Re: Need examples of spinning circle around an object.Unansw
You need to make an angle variable, and then every frame you increment the angle and then rotate the coordinates of the circle by the angle.
The transformation is:
x' = x cos(a) - y sin( a )
y' = x sin(a) * y cos( a )
Google rotation transformation and do some research if you are still clueless.
The transformation is:
x' = x cos(a) - y sin( a )
y' = x sin(a) * y cos( a )
Google rotation transformation and do some research if you are still clueless.
Chili
Re: Need examples of spinning circle around an object.Unansw
what includes are needed for trig operations, math.h??
What you call a bug...I call a new feature!
Re: Need examples of spinning circle around an object.Unansw
Yeah, but since were into C++ stuff, use <cmath> instead. No real difference between 'em.
ʕ •ᴥ•ʔ