Sprite of group doesn't show up

Recommended Posts

Hi i'm very new to phaser and i have one problem.

I'm using a group (called platforms) to put my ground in it.
But when i'm creating the ground and i test the game, the ground isn't showing up.

var game 	= new Phaser.Game(1024, 512, Phaser.AUTO, '', { preload: preload, create: create, update: update });
var platforms;

function preload() {
     game.load.image('platform', 'assets/platform.png');

function create() {

	/* === GROUPS === */
	platforms =;

	platforms.enableBody = true;

    /* === GROUND === */
	var ground = platforms.create(0, 0, 'platform');
	ground.scale.setTo(2, 1);
	ground.body.immovable = true;

I hope someone has a solution for this.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.