Follow the route - VB game

asokfair

Member
Joined
Jan 13, 2013
Messages
22
Programming Experience
Beginner
I am gonna draw one circle using VB paint. in that circle i want to move the object in anti -clockwise and counter clockwise direction.
how can i implement this in C# .net or VB .net

thanks,
Ashok r
 
You can use a Timer to determine when to move the object. As for how, it's simple trigonometry. You know the distance from the centre of the circle and you know the angle of the line from the centre to the object. That angle might change by, for instance, one degree per Tick. Trigonometry can give you the displacement in the X and Y directions of the object from the centre of the circle and that's where you draw your object.
 
Hi ,

thanks for quick reply ,
for example i said its a circle but in real case it shouldn't. it may be a curve path or something like Google map paths
in that case i should compare the pixels values right?
 
Back
Top