Hi,
I’m trying to set the velocity for an object I want to move across the screen.
I’m doing it using the setVelocity method of the object.
I tried to move it at a speed of 10px/s, but I noticed it moved way too fast.
After some investigation, I added logs the the update method of the scene and noticed that the position of the object changes after update - multiple times in a second.
I changed the velocity with:
setVelocity(10, 0);
Am i doing it wrong?
Is there a way to make matter.js update the position every second and not every frame?
I want the position to change continously but I also want to specify the velocity in pixels per second.
(I read somewhere that matter.js uses a 1 meter = 1 pixel as the default ratio).
Am i just supposed to consider the FPS while specifying the velocity?