17-03-2023, 03:24 PM
(This post was last modified: 17-03-2023, 03:29 PM by josemendez.)
(17-03-2023, 02:43 PM)tegleg Wrote: Hi
i managed to get custom physics working with OnBeginStep and it is working nicely
now the visuals are lagging behind, where is that updated?
as you can see in the video the visual representation of the softbody lags behind the wheels and camera, both updated in OnBeginStep
thanks
Hi,
Visuals are updated once at the end of each frame, in LateUpdate, at the end of the solver's physics state interpolation. The corresponding event in the solver is OnInterpolate: http://obi.virtualmethodstudio.com/manua...olver.html
Because of this, it's not possible for visuals and the particle simulation to get out of sync. Chances are the actual simulation of softbody is out of sync with your rigidbody physics. How and when are you updating the soft body's position?
kind regards,