Phaser 3 Example: Set Gravity And Stop Object From Moving When Clicked
In Phaser 3, we can set gravity for an object to make it falling for floating. I am working on a project where I want to set the gravity but when I click on it, the object should stop moving. Here is a working example of a scene. As you would notice, body.stop(), and body.allowGravity […]