Rotation in relations to another object

Hi, so i’m trying to rotate another shape in relations to another shape.
but im not able to do so, how should i go about it(object/class based)?.

best you use
to move to the center of the first object
and now draw second object

could now use
ang += dang;
change the rotation little bit in every draw loop

a general answer if you should use class is not possible
it depends on
++ will you later make many objects like a arrayList of class
++ will they be of different properties ? like color, size…
++ would using a class internal method clean up your code

+++ do you want to learn class ?


1 Like