Search the Community

Showing results for tags 'transform matrix'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

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 guys, im trying to join two meshes (spheres) with a cylinder.( maybe basic but i'm having hard times as a beginner). The problem is that the default cylinder constructor leaves you with just the ability to only set the size , diameter of both top and bottom, and tessellation · Mesh.CreateCylinder(name, height, diameterTop, diameterBottom, tessellation, scene, updatable) ​when i need to do something like · New Cylinder(vectorStart, vectorEnd, scene) ​ i've tried something like: Cylinder = function(vstart,vend, scene){ var HALF_PI = Math.PI/2 ; var distance = BABYLON.Vector3.Distance(vstart, vend); var position = vend.clone().add(vstart).divide(new BABYLON.Vector3(2,2,2)); var material = new BABYLON.StandardMaterial("kosh", scene); var cylinder = BABYLON.Mesh.CreateCylinder("cylinder", distance, 1, 1, 36, scene, true); var orientation = new BABYLON.Matrix(); var offsetRotation = new BABYLON.Matrix(); orientation = BABYLON.Matrix.LookAtLH(vstart, vend, new BABYLON.Vector3(0,1,0)); offsetRotation =BABYLON.Matrix.RotationX(HALF_PI); orientation.multiply(offsetRotation); cylinder.bakeTransformIntoVertices(orientation);; cylinder.position = position;; } but it doesn't seem to work . maybe i'm having a really bad approach of the problem but actually i really don't know what to do . Can someone have any idea for me ? help will be so appreciated thanks in advance ! .