20-08-2019, 06:53 PM
(20-08-2019, 05:46 PM)josemendez Wrote: Hi there,
One word: profile
15 fps per rope is a lot, but without profiling, figuring out the cause is close to impossible. Maybe you have too many iterations per step, or maybe your rope rendering is taking up too much time, or maybe your timestep is too low.
Maybe you're hitting the "well of despair/death spiral", or whatever you call it. - If you don't know what this is, it is a critical topic when dealing with physics. Some resources: https://johnaustin.io/articles/2019/fix-...y-timestep
https://docs.nvidia.com/gameworks/conten...of-despair
https://www.youtube.com/watch?v=sUVqa-72-Ms
There's no magic improve performance button anywhere, so profiling is the only way to tell what the problem is, which is the first step towards fine-tuning performance.
Also, static ropes are just as costly as moving ones. Both need to be simulated, as long as they're visible to a camera.
Hello thanks for the quick reply, yes I am aware that profiling is the way to go but that's the reason for my post, I should have been more clear though. I can see that ObiSolver.FixedUpdate() and ObiSolver.LateUpdate() are both using a lot and causing huge fps drops. I made some screenshots from 2 different frames that show the exact function that is causing the issue.
I did not know about the "well of despair/death spiral" thing, maybe thats because I am still somewhat new to unity.
Thanks a lot,
Jeffrey