[Tutor] Fwd: circular movement in pygame
diliup gabadamudalige
diliupg at gmail.com
Wed Apr 29 09:15:01 CEST 2015
Thanks all for the responses.
Charles Cossé - yes I can write a simple pygame program that makes a
sprite move in a circle but it may not be the style and order that many may
approve or accept. I consider myself a student. :)
No one has pointed out why the object moves in a circle properly in the bit
of code where it is addressed directly and why it does not when the same
code is applied thru a class.
I know that an object can be made to move around the circumference of a
circle by constantly calculating the point and giving the x and y values
1. x = some code
That is what I used and it worked. I was trying to find how we can do the
same thing by updating the current position by doing
2. x += some code
Above 1 works. 2 does not. Why is that?
Both the same code. The same variable is used with different names cause
some others were confused when they were the same.
I hope this time I have answered correctly. No more attachments. (e mail
or otherwise. :) )
More information about the Tutor
mailing list