Matter.body.velocity Bug?

Hi There…

I am using the velocity of player to zoom my camera, so when the player is moving fast the camera zooms out to show you more of the world.

This works fine in the main, but when the player has stopped and the camera zooms in, after about 2 seconds I am seeing some random spikes in player.body.velocity.x / player.body.velocity.y, which is causing my camera to zoom in and out rapidly even though the player is not actually moving.

Is there something else I could use to detect player movement speed, or can you suggest a workaround ?

The player is being moved about using applyforce, and i have gravity set to 0.

Cheers

PS. Phaser is excellent - Well done.

I cannot explain it but for some reason this doesn’t seem to be happening anymore.