Jump to content

Search the Community

Showing results for tags 'autorotate'.

  • 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. Hi, I just started learning babylonjs i have some doubts please help me I am simply making a rubix cube using MeshBox, i just simply want to rotate each block as you know what we did in Rubix Cube now my problem if i use animation for rotating 90 degree like this animationBoxY = new BABYLON.Animation("myAnimation", "rotation.y", 160, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); animationBoxX = new BABYLON.Animation("myAnimation", "rotation.x", 160, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); var keys = []; keys.push({ frame : 0, value : 0 }); keys.push({ frame : 100, value : Math.PI/2 }); animationBoxY.setKeys(keys); animationBoxX.setKeys(keys); window.addEventListener("keydown", handleKeyDown, false); function handleKeyDown(evt){ if (evt.keyCode==65){ Box1.animations.push(animationBoxY); scene.beginAnimation(Box1, 0, 400, true); } if (evt.keyCode==68){ Box1Copy.animations.push(animationBoxX); scene.beginAnimation(Box1Copy, 0, 110, true); } by doing this i had two problem 1. hear both the animation got combined means it's moving diagonally instead of particularly X or Y 2. if i animate in x then y so animation for y is starting with from start not the position where it was last(hope you got what I'm saying) i also tried rotation like this box1.position.x = -2; but this is not auto rotation i want that when i press a key it will rotate 90/-90 degree like in rubix cube Please help me I'm pretty new hear
×
×
  • Create New...