Jump to content

Search the Community

Showing results for tags 'look at'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 1 result

  1. Hello, I've been adding features to my game, and came across a weirdness that I don't know how to explain! I've created the basis for my question here. There are a number of objects in the game scene, and I want the player to be able to choose one to look at. I am using the FreeCamera, since it suits my purposes. After adapting the TargetCamera.setTarget function to return the rotation vector of a camera without setting its target explicitly, I can now create an easing animation which gracefully orients the camera in that direction. The link above demonstrates this working in a loop which starts one animation, then on completion, selects a new random target, and starts the animation all over again. The problem is Line 45: camera.rotation.z = 0; Without this line, at the end of the animation, the camera.rotation (normally a Vector3 with x,y,z) becomes a Vector2 with x,y. This causes the screen to go black after the last frame of animation. Now, my two questions: 1. Why? It seems to me that dropping the last part of a Vector3 at the end of an animation is a bug, but my inexperience with BabylonJS makes me think there is probably a better explanation. 2. Is there a better way that I could animate a FreeCamera's orientation? Thanks for your time, and if this solves a problem for anyone, please enjoy the code Cheers, - Peter
  • Create New...