Filipe Cruz
Filipe Cruz

Reputation: 91

Phaser: Adjust colide area to the image

I have a sprite that have diferent sizes as you can see in the image, is there a Way to close the collide area to que sprite in the exact moment? Or then devide the sprite in 8 and using 2 sprites at the same time?enter image description here

enter image description here

I am deviding the sprite in 4 do animate it, but devinding in 8 only shows half of the image.

Upvotes: 1

Views: 379

Answers (1)

winner_joiner
winner_joiner

Reputation: 14795

You can make the bounding box smaller

image.setSize(x, y, true);

Link to Documentation

And here a working example https://phaser.io/examples/v3/view/physics/arcade/smaller-bounding-box

Upvotes: 1

Related Questions