Hi Sam,
You can’t set ‘self’ in the __init__ method of your class.
Try this:
class Ball:
def __init__(self, pos, radius):
self.pos = pos
self.radius = radius
self.s = sphere(pos = self.pos, radius = self.radius, color = color.red)
then in your update loop:
ball.s.pos = ball.s.pos + ball.v * dt
-steve
> --
> You received this message because you are subscribed to the Google Groups "VPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
vpython-user...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.