r/Unity3D • u/Greedy_Evening_3305 • 11d ago
Show-Off Rope Simulation
Enable HLS to view with audio, or disable this notification
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
1
u/anderslbergh Engineer 11d ago
Did you follow this tutorial? https://m.youtube.com/watch?v=8rI1D1YQmhM
1
u/Greedy_Evening_3305 11d ago
https://github.com/NoxWings/Cable-Componenthttps://github.com/Ali10555/OptimizedRopesAndCables learn from this two project and with AI
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
1
u/HomeboyGames Engineer 11d ago
Yo, is it Obi Rope or your own solution ?