Jump to content

Search the Community

Showing results for tags 'camera position'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

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 2 results

  1. Hello good day / night guys, I am new on the comunity of babylonjs , really happy to have found a great tool to make some games , i have a concern about if there is a way that according to the camera.position.y it can change the scene's properties , for example like the fog if i am underwater and change it back to less fog if i am outside the water ? i've tried this : "scene.getCameraByName("FreeCamera").position.y<=0" and "scene.getCameraByName("FreeCamera").position.y>0" , but not sure if it is okey to set it inside the : scene.registerBeforeRender ? like this : scene.registerBeforeRender(function() { if(scene.getCameraByName("FreeCamera").position.y<=0){ // properties for camera when is inside water } if(scene.getCameraByName("FreeCamera").position.y>0){ // properties for camera when is outside water } }); will this affect performance? , or there is another way to detect camera positions to change properties according to the high level ? , thanks in advance
  2. Hi, I am not sure if this is a bug. I am trying to increment both the position of the world camera and want to move all their displayed object update: function () { this.game.world.y = 100; console.log(this.game.world.y);},The position of the world is changed but the world did not move update: function () { this.game.camera.y += 1; console.log(this.game.camera.y);},This time, the camera only results to zero. I have tried moving the camera with Phaser 1.1.3 and it works. I am curious why this approach is not working for 1.2. Thank you
×
×
  • Create New...