Hello. I am using matter.js. To forbid the rotation of the player, I set its angular velocity to zero in update(). Is this the standard way to do that ?
And when I move the layer, small gaps appear between tiles as the figure shows below. (Here I use some static shapes for collision detection). In this topic, it’s metioned that this is the pixel bleeding. Is this still a problem is webGL ? I didn’t find this phenomenon in the examples provied by phaser3.
OK, thanks.
Then what shoud I do to the camera view ? I find this problem happens if I make the camera follow the player. If I just scroll the view like below, it won’t happen.
I find a phase3 example: Tilemap > collision > matter platformer modify map
In this example, rotation forbidding is achieved by using the setFixedRotation() function on the sprite.
Also, in this example, it uses a smoothMoveCameraTowards() function to make the camera follow the player. If I change it to
this.cameras.main.startFollow(this.player);
gaps also appear between tiles. So I guess this maybe a solution.