Description

My Rope Physics is not based on GameMaker's (box2D) physics. It is based on Verlet Integration, a very fast algorithm for calculating motion.

My script works in one simple object and it's easy to use. A whole motion is calculated only by changing a previous and actual position of rope's points.

Collision handling and mouse moving in my example are in the step event. You can delete unwanted things and expand collision code to your needs because I tried to keep it simple.

  • knotNum - this is a number of rope points, the more it has the smoother it is. Use this in for loops
  • knotX[i] and knotY[i] - this is current position of single point
  • knotXprev[i] and knotYprev[i] - this is previous position of single point
  • gravX, gravY - gravity vector
  • ropeLen - the initial length of rope. ( rope could be stretched during motion )
  • constraintsIterations - number of 1 is a minimum value, the more it has the more precise a simulation will be. But don't use high values.

End User Licence Agreement (EULA).

Age Rating: 4+

Versions

GMS2 - Version 1.0.1. Published November 12, 2017

GMS1 - Version 1.0.1. Published August 23, 2017

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait

Back to Top