Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix for boundary spinning #8
It is calculating the intersection point correctly, but it doesn't appear to be reflecting from the surface. So before it slid, in this commit it sticks, but I believe the end goal is to have it reflect. Is this correct?
Would it make sense to add an reflectionPoint function to calculate?
The reflection vector will also want to be multiplied by this.groundFriction. When this.groundFriction is 0, it would exhibit how this is currently implemented. It may make sense to rename it from groundFriction to something like surfaceFriction. Do you think this make sense?
This is great! One comment is inline. Also:
I appear to be using tabs for spacing. It looks like your editor is using spaces. Could you switch to use tabs so that the indentations match?
line 165: https://github.com/cwgreene/verlet-js/blob/master/js/verlet-js/verlet.js we may no longer need this block, as I think the groundFriction would be moved into your bounds function.