Search the Community

Showing results for tags 'cylinder'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Found 4 results

  1. I have recently started on a Babylon project, and I have been wanting to create a capsule physics impostor for my game. I found a test demo for Oimo.js that basically achieves what I want: compound test (capsule). There are two problems: 1. due to some shortcomings in Oimo, I have had to switch to Cannon.js. 2. the demo uses Three.js and I'm sure how to exactly translate that into Babylon. I basically want to be able to combine two sphere impostors with a cylinder impostor. I'm not sure what is the best method for this, there are only a few examples that I have found, and I haven't found anything in the docs. So I created an example to show what I am talking about: capsule sandbox. I have created the capsule mesh, but I just need to figure out how to add a capsule impostor. Thanks.
  2. TypeError: e is undefined

    Hello all, I'm trying to programmatically create a cylinder using the following: var cylinder = BABYLON.MeshBuilder.CreateCylinder("wormhole", {diameter: 1, tessellation: 24}, this.resourceStore["GameScene"]); cylinder.position = BABYLON.Vector3(-0.56, 1.27, 1.235); and it is throwing a TypeError: e is undefined with the following trace: o</i.prototype.copyFrom() babylon-2.4.min.js:1 t</i.prototype.computeWorldMatrix() babylon-2.4.min.js:6 o</i.prototype._evaluateActiveMeshes() babylon-2.4.min.js:10 o</i.prototype._renderForCamera() babylon-2.4.min.js:11 o</i.prototype._processSubCameras() babylon-2.4.min.js:11 o</i.prototype.render() babylon-2.4.min.js:11 GameManager.prototype.initialize/</textTask.onSuccess</<() GameManager.js:191 bound () self-hosted c</o.prototype._renderLoop() babylon-2.4.min.js:4 bound () self-hosted Any ideas? Everything works fine (i.e. scene loads, textures show, materials work, controls work). I have noticed lately that my textures seem to disappear at a particular camera but the geometry is still there. Not sure if its related.
  3. 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 ! .
  4. Hi everyone. First of all congrats for this great webgl framework. I am a c# programmer, and rather new to javascript world, but I had really no problems in using Babylon.js following your tutorials. In order to train with webgl i am actually creating a scene which represents the Solar System. I am stucking about which mesh should i use to draw Saturn Rings. What i need would be a sort of 2D circle, with external and internal radius property, but i wasn't able to find such a mesh. Cyclinder would be ok, defining heights to 0, but i can't define an internal radius. Torus looked ok at first, but i cannot deal with thickness properties in order to make a torus looks like a 2D ring. Does anyone has any advice ?