Jump to content

Search the Community

Showing results for tags 'vector3'.

  • 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 7 results

  1. Hi, I want to create city map with 3D buildings. I have GeoJSON with building data. I'm using this data to make 2D polygonal mesh (building shape). http://www.babylonjs-playground.com/#10IOII#14 (I've used example values) Is there way to add 3'rd dimension to it? I want to use my 2D mesh as base for 3D Object. Is it possible to store this 3D object as Vector3? I want to map all verticles and keep them around for future use. (I'm starting with babylon.js, i don't know is this proper way to do it.) { "type":"FeatureCollection", "features":[ { "id":"w26358613", "properties":{ "levels":8 }, "geometry":{ "type":"Polygon", "coordinates":[ [ [ 13.426143, 52.51832 ], [ 13.426195, 52.518392 ], [ 13.426155, 52.518423 ], [ 13.426192, 52.518479 ], [ 13.426252, 52.518476 ], [ 13.426296, 52.51854 ], [ 13.426473, 52.518496 ], [ 13.426319, 52.518275 ], [ 13.426143, 52.51832 ] ] ] }, "type":"Feature" } ] }
  2. Hey, I have a problem with the function Project function inside the Vector3 class. This is my code: var screenXY = BABYLON.Vector3.Project( new BABYLON.Vector3(10, 10, 10), BABYLON.Matrix.Identity(), scene.getTransformMatrix(), camera.viewport.toGlobal(engine.getRenderWidth(true), engine.getRenderHeight(true)) ); What I want to do is get the 2d screen x/y position from a 3d vector. And this is what gets returned from the function: Vector3 {x: NaN, y: NaN, z: NaN} How can I fix this?
  3. I am creating a script that will move a box along the vector in front of the center of the camera: https://www.babylonjs-playground.com/#KWD0E1 Apart from the textures not loading, why does this script seem to not process the collision of the box falling onto the larger box in BJS Playground? The box upon which the smaller box falls seems to flicker, then disappear entirely after the smaller box lands. It works fine on my server. Also, is there a more elegant way to accomplish this in BJS?
  4. Likely a very simple question for the veterans Is it possible to convert a Vector3 given in world space coords to the local space of a mesh? Example: http://www.babylonjs-playground.com/#XMFZ0Z#3
  5. I don't know if some other people here have little difficulty to visualize what is a vector in 3d space, but I had to help myself so as to set directionnalLight direction, which is a vector3 value. So I set this little playground and I put it here if this can help others http://www.babylonjs-playground.com/#HEACG9#2 It may be useful to help orient a camera, a directionnalLight, and whatever.
  6. I am not sure if this is a bug or not. When I use something like sphere.position.y = string1; if string1 can be converted into a number it will , and this value is used to update what you see on the screen. So far so good. Now when I did sphere.position.y += 1; I expected it to use the internal number it used to position ittself correctly on the y axis and to add 1 to it, but instead used string1 as a basis, and the result is far off. Why does sphere.position.y = ... not transform into a number both sides the internal number but also the public number; what you get back when you look for sphere.position.y again. See in the console, in this playground http://www.babylonjs-playground.com/#1QFFPV#1
  7. Hello, I've got the following "simple" code. This will be the most complex my model gets, probably, but currently it is not working. I receive the following error when I call BABYLON.Mesh.CreateTube, //... var tp = createArchPoints(10, 32); var tube = BABYLON.Mesh.CreateTube('my tube', tp, 2, 12, null, BABYLON.Mesh.CAP_ALL, scene); //... Which my arch points are created using the very helpful Quadratic Bezier calculation. var createArchPoints = function(dim, count) { var po = new BABYLON.Vector3(0,0,0); // origin var pc = new BABYLON.Vector3(0,0,dim); // control var pd = new BABYLON.Vector3(dim,0,dim); // destination var points = BABYLON.Curve3.CreateQuadraticBezier(po, pc, pd, count); return points; } I know the radius, will be constant; so I do not want a radius function. The points themselves, as far as I can tell, appear to be realistic, as expected. Is there something I need to do to dress the CreateQuadraticBezier result before passing them to CreateTube? My assumption is that one returned a Vector3[], which the other expects as a parameter, but I could be wrong, it's hard to tell sometimes with JavaScript being weakly typed. Any other calculations I need will be along the lines of rectangles in 3D space, even with a couple of transformations and translations, but these are more straightforward in my mind. To help with response, my level of js confidence is growing probably 4 out of 10; 3D about the same, my frame of reference are libraries like Helix Toolkit for WPF (C#) in which I've already done a similar model, just wanting to do something like that with Babylon; also loosely familiar with THREE, so probably same, 4 out of 10. That to say, I'm learning, but I can discuss halfway intelligently. Thank you... Regards, Michael Powell
×
×
  • Create New...