Okay, since people are wanting to know and I GOT A DUMB RATING I'll give you the code I've been working on.
This is my bike
__author__ = 'Kurt Hansen'
__date__ = 'Sept 1, 2009'
from cs1graphics import *
paper = Canvas(500,200, 'white', 'Kurt Hansen')
bike = Layer()
tire = Layer()
tire1 = Circle(40, Point(0,0))
spokes = Layer()
spoke1 = Path(Point(0,0),Point(0,40))
spoke2 = spoke1.clone()
spoke3 = spoke2.clone()
spoke4 = spoke3.clone()
spoke5 = spoke4.clone()
spoke6 = spoke5.clone()
spokes2 = spokes.clone()
spokes3 = spokes.clone()
spokes4 = spokes.clone()
othertire = tire.clone()
frame = Layer()
path1 = Path(Point(0,0), Point(60,20))
path2 = Path(Point(60,20), Point(115,-80))
path3 = Path(Point(150,0), Point(115,-80))
path4 = Path(Point(115,-80), Point(30,-70))
path5 = Path(Point(60,20), Point(28,-85))
path6 = Path(Point(30,-70), Point(0,0))
path7 = Path(Point(115,-80), Point(115,-100))
seat = Rectangle(20, 5, Point(28,-85))
This is the environment.
tree = Polygon(Point(50,80), Point(110,100), Point(110,60))
tree2 = Polygon(Point(0,200), Point(60,60), Point(120,200))
This is what I've used to do the animation.
i = 0
i = i+3
Basically I moved the bike to the right with the moveTo command and also rotated the tire layers WITHIN the bike layer, so that I didn't have to move the tires independently of the bike.
Anything else whiners?
What was it? I'm interested now.
Atleast keep the firstpost and the solution so other people that may have this problem can solve it too.
[QUOTE=maurits150;17199104]Atleast keep the firstpost and the solution so other people that may have this problem can solve it too.[/QUOTE]
Yeah I hate when people do that D:
[QUOTE=Pandamobile;17199259]Yeah I hate when people do that D:[/QUOTE]
Haven't you heard? The internet exist purely to service one user! If he isn't entertained, the rest of us suffer.
You could do what I do and just make a timer, which is just an int which you increase every frame. Wait for it to hit your specified value. Then reset the value.
Sorry, you need to Log In to post a reply to this thread.