01-25-2023, 11:01 AM
Hey Aka,
hope you are fine.
I have a SplineController component on my GameObject which handles the spline movement which is fine, I calculate the speed of my object and it the controller sets the object to the right position and cares about events, etc.
I know that I can set when the updating should be handled, Update, LateUpdate and FixedUpdate, but that's not exactly what I need.
I am working on a multiplayer game and I need to call Update manually, but with a defined timeframe. The splinecomponent update probably does something like position+=speed*time.deltatime. But I need to calculate the position for interpolation between different snapshots I receive from the server, so instead of time.deltatime I need to set the delta time by my own. Is there a way to do this with the controller?
I know that I can do the calculation by my own and calc the position instead of the controller, but then I need to handle all the other stuff by my own as well.. like the behavior at spline end, events, etc.. So if it's possible I would like to avoid doing everything by my own.
Best regards,
Marco
hope you are fine.
I have a SplineController component on my GameObject which handles the spline movement which is fine, I calculate the speed of my object and it the controller sets the object to the right position and cares about events, etc.
I know that I can set when the updating should be handled, Update, LateUpdate and FixedUpdate, but that's not exactly what I need.
I am working on a multiplayer game and I need to call Update manually, but with a defined timeframe. The splinecomponent update probably does something like position+=speed*time.deltatime. But I need to calculate the position for interpolation between different snapshots I receive from the server, so instead of time.deltatime I need to set the delta time by my own. Is there a way to do this with the controller?
I know that I can do the calculation by my own and calc the position instead of the controller, but then I need to handle all the other stuff by my own as well.. like the behavior at spline end, events, etc.. So if it's possible I would like to avoid doing everything by my own.
Best regards,
Marco