Search the Community

Showing results for tags 'off camera'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. 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.