Gijs

Members
  • Content Count

    141
  • Joined

  • Last visited

Everything posted by Gijs

  1. Hi, You need to add the TypeScript declarations of Babylon.js: Put "babylon.d.ts" from here with the other files, and then compile it like this: tsc game.ts babylon.d.ts
  2. There is, and it is by pulling the ground over a mesh. So you would create a ramp mesh (ground), and then pull the ground over it. It works better than the old code, and you can do much more with it as well. Here it is: http://www.babylonjs-playground.com/#GQ83J#3 The brush size is now in BJS units. I also added some example shapes you can uncomment. I like how elegant the new addRamp function has become Edit: I fixed a wrong ray length in the code, added a new option to not let the ground go lower (allows ramps to go through each other), and corrected the comments: http://www.babylonjs-playground.com/#GQ83J#4
  3. Hi all, Apparently points are not considered to be in a triangle when they are on the edges - is that "expected behavior"? It isn't to me... BABYLON.Vector2.PointInTriangle(new BABYLON.Vector2(0, 0), new BABYLON.Vector2(0, 0), new BABYLON.Vector2(0, 1), new BABYLON.Vector2(1, 1)) Thanks
  4. You're welcome, but I just thought of a more general method of doing such things, so if that works out, the ramp code may soon be obsolete
  5. Hi, it's a fun challenge! I tried my best to make something like in the video, and here are the results: This is the standalone version. You can adjust the brush size. http://www.babylonjs-playground.com/#RKPBE#17 Tip: enable wireframe mode on the material to see the geometry better. This is your #13 mixed with my #17: http://www.babylonjs-playground.com/#RKPBE#18 I saw buttons in your demo very briefly, but for some reason they usually don't show. I made the middle mouse button for 'ramp' instead, left is to make mountains. Hopefully it is of some use to you. Good luck with your project!
  6. In your second playground, both the if and else are red, but that wasn't the problem. I changed your playground so that it checks for collisions a frame after the objects have been added to the scene: http://playground.babylonjs.com/#15VR2V#3 And it works just fine. It adds the meshes after 120 frames, and it checks for collisions at frame 121. Black is no collision, red is collision. Maybe that helps
  7. I know, but the page I linked lists it as reserved, and says "In JavaScript, some identifiers are reserved words and cannot be used as variables or function names."
  8. Hi, while making a 3D modeller, I found that the Curve3 class has a function named "continue", which seems to be a reserved word. Apparently it hasn't broken anything thus far, so is it fine, or should it be deprecated / renamed to "concat"?