How to attach a line to a moving object?

Posted by snow-spur on Stack Overflow See other posts from Stack Overflow or by snow-spur
Published on 2010-06-12T05:11:00Z Indexed on 2010/06/12 5:12 UTC
Read the original article Hit count: 153

Filed under:

Hello i have designed a maze and i want to draw a path between the cells as the 'person' moves from one cell to the next. So each time i move the cell a line is drawn

I have done this so far but do not want to show my full code However i get an error saying Circle has no attribute center

my circle which is my cell

center = Point(15, 15)
c = Circle(center, 12)
c.setFill('blue')
c.setOutline('yellow')
c.draw(win)

p1 = Point(c.center().getx(), c.center().gety())

this bit is in my loop

p2 = Point(getx(), gety())
line = graphics.Line(p1, p2)

© Stack Overflow or respective owner

Related posts about python