I'm trying to make a simple sidescroller, extending this tutorial.
It uses Matter.js and p5.js
To move left and right, I'm getting the mouseWheel delta.
translateX += event.delta;
From there in the drawing function I can call
translate(translateX, 0);
This moves all of my p5.js drawings. The problem is, how do I tell Matter.js? All my interactions are off now by the delta. The boxes are now 100px to the right, but the interactions are in the original location.
I tried using World.translate but it seemed like it was moving the bodies oddly and not moving the constraints at all. Maybe it's the wrong approach.