如果你只是想改变大小,因为物理碰撞,你可以简单地使用Body
对象的函数setSize
.(100)
使用setOffset
,您可以将碰撞框移动到正确的位置.
(100)
player.body.setSize(10,10);
player.body.setOffset(5, 0);
100 you can find an official example with a static body, where the collision box is been made larger, with the same function.