Jump to content

Search the Community

Showing results for tags 'Camera.'.

  • 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 1 result

  1. I would like to animate my camera from current position to another pre-determined position. Mattx264 posted the following function in 2014 According to Mattx264 function, how does the script know where the end position is located? Does toAlpha, toBeta, toRadius recieve a number? If not, how does the code know where the end value of these parameters are? Can anyone demonstrate this code in the playground? I dont understand how the end position of the radius, alpha, and beta are located in the script. There is no variables declared about them. Thanks, ah BEST ANSWER mattx264, 23 April 2014 - 04:20 AM Thank you @Deltakosh. I wrote this function, may be it will help somebody. var ArcAnimation = function (toAlpha, toBeta, toRadius,position) { var animCamAlpha = new BABYLON.Animation("animCam", "alpha", 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); var keysAlpha = []; keysAlpha.push({ frame: 0, value: camera.alpha }); keysAlpha.push({ frame: 100, value: toAlpha }); var animCamBeta = new BABYLON.Animation("animCam", "beta", 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); var keysBeta = []; keysBeta.push({ frame: 0, value: camera.beta }); keysBeta.push({ frame: 100, value: toBeta }); var animCamRadius = new BABYLON.Animation("animCam", "radius", 30, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); var keysRadius = []; keysRadius.push({ frame: 0, value: camera.radius }); keysRadius.push({ frame: 100, value: toRadius }); animCamAlpha.setKeys(keysAlpha); animCamBeta.setKeys(keysBeta); animCamRadius.setKeys(keysRadius); camera.animations.push(animCamAlpha); camera.animations.push(animCamBeta); camera.animations.push(animCamRadius); scene.beginAnimation(camera, 0, 100, false, 1, function () { }); }GO TO THE FULL POST
×
×
  • Create New...