Hey guys
I am trying to smoothen a polygon, but it keeps saying that “smooth” is not a function. Here it is in the docs:
Phaser code:
My code goes here
const polygon = new Phaser.Geom.Polygon(coords);
polygon.smooth(1);
Docs are saying:
Smooths the polygon over the number of iterations specified.
polygon.smooth(iterations);
console: TypeError: polygon.smooth is not a function
- I doublechecked that the polygon is created correctly
- I also called smooth after applying it to a graphics
what am I missing hear, you got an idea? Reading the docs it should work I think.
Using Phaser 3 version: 3.18.1
cheers