Hi! I have been playing around with procedurally generating 2D chains during runtime because it’s an essential part of my first project (admittedly I spent too much time on figuring this out but it’s been a good learning experience).
I managed to get a working model, albeit primitive, by linking cloning a sprite (a subunit of a chain in this case) and linking them with hinges; here is a demo (I’m not sure what are the “real” unit for gravity Unity uses, so I’m just using G for that):
I’m not sure that I’ll ever apply too much force to a chain so this is more of an academic exercise than anything else (also, it’s better to be safe than sorry). Thank you very much in advance for any suggestions!
Thank you. x: Now I feel silly - I did look last night using with similar keywords but I have no idea why I didn’t see them/basically ignore them. I shall try again and report back!
I tried it again just and tried the suggestions in this thread in a 2D context. Increasing either the number of Velocity Iterations or Position Iterations appear to stop the chains from falling apart due to excessive force; unfortunately, I have no means to test which is more effective. Adjusting the size of Fixed Timestep also fixes the problem but it appears to be the most expansive option out of all three.
Increasing the Angular Drag on the subunits also works and, as far as I can tell, it’s the least expansive solution but it does change the behaviour of the chain very slightly. Decreasing the Mass of the subunits has no noticable effect whatsoever.
I was able to have more than 100 subunits with these methods - in fact, FPS started to become a big problem for me before I could break the chains. xD