Closed k206i closed 1 year ago
Please can you enable the physics debug? In that way we can know what's going on. In the game config, set:
const game = new Phaser.Game({
physics: {
default: "arcade",
arcade: {
debug: true
}
}
});
BTW, is it scaled the platform object?
Please can you enable the physics debug? In that way we can know what's going on. In the game config, set:
BTW, is it scaled the platform object?
Yes, this is a scaled platform prephab
Please, try without scaling the platform. Or you have to call the platform.body.updateFromGameObject()
method after you scale the platform.
https://newdocs.phaser.io/docs/3.60.0/focus/Phaser.Physics.Arcade.StaticBody-updateFromGameObject
BTW, I recommend you take a look at this tutorial. In this part it talks about refreshing the body after changing the scale: https://youtu.be/nMXOcrQU9cs?list=PLB8gI_5U0MvBiK7GExn8ONPk5jDPd2KlE&t=237
Please, try without scaling the platform. Or you have to call the
platform.body.updateFromGameObject()
method after you scale the platform.
It works for me. Thank you!
BTW, I recommend you take a look at this tutorial. In this part it talks about refreshing the body after changing the scale:
Thanks for your tutorials! They help a lot!
Version
Description
Offset of Arcade Physics Body Geometry not working. I have seted some offset:
But body has collide like offset was not set: