Deleting trail/retain of a moving displayObject

1k views Asked by At

How do you delete a trail from a moving object (the trail exists out of points)?

I thought that if you,

sphere.retain = 0
sphere.make_trail = False

It would instantly delete the trail. But this ins't true because if you put a:

sleep(50)

after it. You can see that the trail is still there.

1

There are 1 answers

0
user1114907 On

Setting s.make_trail = False just means "stop adding points to the trail".

In GlowScript VPython or Jupyter VPython you can say s.clear_trail().

In Classic VPython, s.trail_object is the curve or points object, and you can delete elements of these objects.