Rigidbody2d interpolation
Options
Hi,
Actually rb interpolation is made by a simple linear interpolation, with a constant interpolation factor. This approach doesn't scale well, and it's impossible to find a good absolute constant for each object. Also, if we try to do something like a slow-motion, the situation get worse.
Unity's rigidbodies should use a different approach. I think that transforms and graphics are a frame behind the physics. With this small delay we can determine exactly where a rb should be at a given time.
http://answers.unity3d.com/questions/767134/physics-what-is-interpolate-extrapolate-discrete-c.html
http://answers.unity3d.com/questions/1071036/what-kind-of-interpolation-for-my-rigidbody.html
Can you use a similar technique for TrueSync?
Thanks,
Devis
Actually rb interpolation is made by a simple linear interpolation, with a constant interpolation factor. This approach doesn't scale well, and it's impossible to find a good absolute constant for each object. Also, if we try to do something like a slow-motion, the situation get worse.
Unity's rigidbodies should use a different approach. I think that transforms and graphics are a frame behind the physics. With this small delay we can determine exactly where a rb should be at a given time.
http://answers.unity3d.com/questions/767134/physics-what-is-interpolate-extrapolate-discrete-c.html
http://answers.unity3d.com/questions/1071036/what-kind-of-interpolation-for-my-rigidbody.html
Can you use a similar technique for TrueSync?
Thanks,
Devis
0
Comments
-
Hi @Devis,
Did you try the interpolate option in the TSRigidBOdy2D? What did you think about the interpolation?0 -
Hi @JeffersonHenrique
Yes, I've tried, but how I wrote in my post, this is a simple linear interpolation. Unfortunately, this solution doesn't scale well. I think that a frame of delay (like the one described in Unity Answers) is necessary in order to have a correct interpolation.0 -
Hi Devis,
I believe this is the article in question:
http://answers.unity3d.com/questions/1119684/interpolating-between-fixedupdate-frames.html0 -
Exactly @erickpassos , the concept is the same.
An object should know its previous physics position and its transform should be updated starting from it.0 -
@JeffersonHenrique : Do you think that it's possible to add a similar feature to your TSTransform2D/TSRigidbody2D?0
-
Hello @Devis, it is feasible, we are logging all this interpolation report you did to analyze further in our internal roadmap.0