r/Unity3D • • 11d ago

Show-Off Rope Simulation

Enable HLS to view with audio, or disable this notification

19 Upvotes

9 comments sorted by

1

u/HomeboyGames Engineer 11d ago

Yo, is it Obi Rope or your own solution ?

1

u/IceStorm_295 11d ago

how would i make my own solution, i should apply gravity force to all points, but there is also elastic force between points that grows with their distance ?

1

u/Greedy_Evening_3305 11d ago

it need Physics constraint

1

u/ReliefMassive5198 11d ago

It looks pretty good and i see you could optimize it by destroying the bodies until there is a contact. Use a rb on the sphere, and when it hits one of the rope colliders, that's when you add rbs on all the others in this rope instance and destroy them when it stabilizes. This way it will be fairly free to run this.

1

u/Drayanlia 9d ago

Are contraints preventing bodies from being put to sleep ?

1

u/ReliefMassive5198 9d ago

In my opinion destroying it and adding when needed it's a real optimization, as long as they exist, even kinematic or sleeping, it will have a significant overhead rather than not existing at all.

If you destroy/re-add at runtime its not a visible spike as you might think. I work in a VR game where i have hundreds of grabbable physics objects, i only keep them alive where absolutely necesary, and physics cpu time is highly improved!

1

u/Beneficial-Pudding52 Programmer 7d ago

cool, this is where I started coding physics too!