Rotation issue

In this code a mouse click will cause one of the objects to move. Often, when the balls slow down they start to rotate off axis. Is this expected behaviour? If so is there any way to avoid it? It’s quite important that the balls only ever move in a straight line. Any ideas how I might achieve this?

Use setDamping() etc.

https://repl.it/repls/UnrealisticInformalUtility

Great. Thanks Samme.