Jump to content

Search the Community

Showing results for tags 'rotatearound'.

  • 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 together, can someone explain me the behaviour of the following: Step 1: creation of 4 boxes: let box = new BABYLON.MeshBuilder.CreateBox("0", 1, scene); let box1 = new BABYLON.MeshBuilder.CreateBox("1", 1, scene); let box2 = new BABYLON.MeshBuilder.CreateBox("2", 1, scene); let box3 = new BABYLON.MeshBuilder.CreateBox("3", 1, scene); box1.position = new BABYLON.Vector3(7,0,0); box2.position = new BABYLON.Vector3(8,0,0); box3.position = new BABYLON.Vector3(9,0,0); Step 2: now lets group boxes 1, 2 & 3 and apply rotateAround: box3.setParent(box2); box2.setParent(box1); box1.rotateAround(new BABYLON.Vector3(7,0,0),BABYLON.Axis.Y,Math.PI/2); For me it seems that the grouped boxes are moved to (0,0,0) after the rotation. Or am I getting something wrong? See your self: https://playground.babylonjs.com/indexStable.html#T99QF6#1 --> Also: I want to create two abstract methods (1) Rotate an arbitrary mesh (having children) around it's "Center". (2) Position an arbitrary mesh (having children) sucht that it's top left corner is at some target coordinates. I always encounter problems with getting the current Boundingbox (even if I calculate it recursively by merging the bounding boxes of the children). I almost feel like I am not understanding something entirely. How would you implement such a method? Thanks for helping ;)
×
×
  • Create New...