Forces

This week assignment I tried to create a Mover objects that repel from each other but attracts to the mouse (when clicked).

forces repel attract

 

My main problem was understanding the final action that puts the new force in action. in the beginning we did acceleration = mouse, meaning the acceleration is now the mouse vector which needed to be normalized and multiplied by something (to avoid a teleportation to it). In other occasions we just added the new vector to acceleration mouse.add(acceleration) in which case the new vector is adding its “influence” to the acceleration.

Hopefully this would become clearer in class…

Leave a Comment

Required fields are marked *.