Could Defold 3D collision objects have an "Interpolation" setting like in Unity?

Collision objects move on the fixed_update loop, while the game renders everything on the update loop.

In Unity, collision objects (rigidbodies) have a setting called “Interpolation”: https://docs.unity3d.com/Manual/rigidbody-interpolation.html

Interpolation moves the visual position of the collision object during the update loop, based on the collision object’s actual position in the fixed_update loop.

What this does is it allows your update framerate to be higher than the fixed_update tickrate, without the collision body stuttering.

Here’s a visual example in Unity: https://www.youtube.com/watch?v=_fsnju4tahQ

This is a very useful feature to have because it allows for a low fixed_update step which is useful for mobile development, while still having everything appear buttery smooth regardless of framerate :slight_smile:

3 Likes

You can do this, yes. The main difference between Unity and Defold is that Defold never assumes what you are trying to do, unlike Unity that adds tons of “kitchen sink” features to code that you might not need all of. It also depends on how you are handling the movement in the physics, i.e. are you using forces to move objects or just checking collisions and moving the object in code?

It should be possible to interpolate the movement of a GO based on the predicted trajectory of a GO with a dynamic collisionobject, but meanwhile, it would be up to the engine to interpolate the position of the GO possessing the dynamic collisionobject itself.