jacrunner

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by jacrunner

  1. @HeelDiggy ...BAYBAY!

  2. jacrunner

    Off Camera items,

    hey guys, so I have been using phaser for a few weeks now. In my game, I have my camera following my character as the progress through a bottom-top level. what I have been trying to do is, have any objects that the player by passes and if the object falls out of camera view, I would like to destroy the object and respawn it higher in the level. I have found a few other posts about this but from the suggestions there, I have not been able to make it work. so far my code for the objects is as follows:- var rPipe = platforms.create(480, 220,'rightpipe'); rPipe.checkWorldBounds=true; rPipe.body.immovable = true; if (rPipe.y > game.camera.y){ rPipe.kill(); } var lPipe = platforms.create(0, 104,'leftpipe'); lPipe.body.immovable = true;As you can see, I have the rPipe checking that it's own position every frame, however if it was to have a greater Y position than the game camera plus the stage height then I would destroy it. Any help would be appreciated and if you need to see more of my code then let me know.
  3. jacrunner

    jiggle object.x position

    hey guys, I have a bottom-top game where I have the player navigating through objects. However, I am wondering if it is possible to have the game make minor changes to the x coordinate as opposed to me setting the object to specific coordinates? if you guys could provide any help that would be much appreciated!