Problem with springs motion

Hi solub,

I can’t run your code right now and you video link is broken so I can’t help much.

I just noticed 2 typos in your code:

#Locking particles on the edges (far left and far right)
    pointlist[0].lock()
    pointlist[-1].lock() // Here with the -1
def draw():
    global t, poitlist // shoudnlt it be pointlist?

I’ve never used Python but is this normal that you declare pointlist and t at the very beginning and once again at the beginning of draw?

Are you sure that when you set the positions of your points in draw, it also update the position in the physics engine?

What is the purpose of your t variable?

3 Likes