Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

phaser rotate around distance

    preload ()
    {
        this.load.image('ball', 'assets/sprites/shinyball.png');
    }

    create ()
    {
        this.group = this.add.group();

        for (let i = 0; i < 32; i++)
        {
            this.group.create(i * 32, i * 2, 'ball');
        }
    }

    update ()
    {
        Phaser.Actions.RotateAroundDistance(this.group.getChildren(), { x: 400, y: 300 }, 0.02, 200);
    }
Source by github.com #
 
PREVIOUS NEXT
Tagged: #phaser #rotate #distance
ADD COMMENT
Topic
Name
2+6 =