A long time ago I used iOS Obj-C and then Swift and there was a way to set a body size for a sprite that was different than the display size.
So if I have an image that has a lot of clear space and want to use it for a sprite and then have collisions on the sprite but not collide on the clear space , I would want to make the sprite’s body smaller than its display so that the physics does not do collisions on the display but only on the smaller body.
How do I change the body size for a sprite so the physics uses it without effecting anything else?
Thank for any advice, pointers, solutions.
Hi,
sprite.body.setSize(width, height);
And if needed you can do a setOffset
Thanks - that does what I needed?