How to change the shape of a body on arcade physics?

Hey guys i would like to change the physics shape of a body from the rectangular of default to a shape made by myself. I have written this code, but it doesnt work… someone can help me? I need this because i want to set a perfect collision boundary

Code:

var arnShape = new Phaser.Geom.Polygon([
171, 425,
4, 330,
5, 322,
0, 314,
35, 291,
36, 256,
7, 238,
4, 230
]);

var arn = this.physics.add.sprite(1850, 650, ‘image2’).setOrigin(1, 1)
.setInteractive(arnShape, Phaser.Geom.Polygon.Contains);

Hi,

As answered in your other post, Arcade doesn’t allow that.
You need Matter as it offers polygon support.

This sandbox shows how to import custom shapes designed in Code&Web’s Physics Editor.

The other approach is to design design custom shapes for your level’s tiles using Tiled; this tutorial is quite interesting as shows how to design custom shapes and have Phaser perform the import into Matter bodies automatically.