Conveyor belts are hard

I have spent the past few days getting conveyor belts working in the Godot Engine. I thought it would be as simple as adapting how Unity approaches to Godot. That was simply fruitless since Godot and Unity seem to handle physics differently. I resorted to setting the axis velocity each frame, but this had a side effect. Anything on the converyor belt was essentially being dragged along. This meant that they would roll towards it's destination, even if it was a box. Changing the friction of the conveyor belt caused the objects to ping pong on the conveyor belt.the solution I finally settled on was to simply translate the position of the objects. This method also has it's own issues. Simply translating every frame introduces very heavy jittering. The solution I came up with is to update every 4 frames. This gives the most realistic movement with the fewest lines of code. Next will be implimenting what will happen when a player stands on a conveyor belt as it is not a static or rigid body.

Demo

Posted on Mar 03, 2018.