Jump to content

initialising sprites out of view with collideWorldBounds enabled


Recommended Posts

Hi all,

I can't seem to find any documented way of initialising a sprite with a negative axis value, whilst having collideWorldBounds enabled.

It appears to be resetting my negative axis values to 0 upon rendering, which makes it appear really clunky.

    app.game.prototype.spawn = function() {
        var germId = germs[Math.floor(Math.random()*germs.length)],
            germ = spawnGroup.create(
                this.rnd.integerInRange(0, this.world.width),


        germ.body.gravity.y = this.rnd.integerInRange(200, 500);
        germ.body.collideWorldBounds = true;
        germ.inputEnabled = true;
        germ.events.onInputDown.add(this.onInputDown, this);

Any suggestions on how to get around this?

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...