25-02-2021, 01:50 PM
(This post was last modified: 25-02-2021, 02:04 PM by josemendez.)
(25-02-2021, 12:51 PM)zero16832 Wrote: thx for your help! a new question: when i make a camera follow the softbody,the camera shaking a lot。
Is there any way to avoid this?
All physics in Unity take place in FixedUpdate(). FixedUpdate() might not be called at all, or be called more than once per frame, so it's not called in sync with Update or LateUpdate. That will cause the camera movement to jitter.
Either smooth out your camera movement (using any of the functions that Unity provides to smooth out movement), or enable interpolation (setting in the ObiSolver component) and subscribe to solver.OnEndStep, then update the camera there.