• Content count

  • Joined

  • Last visited

  1. Just randomly came across some videos of Energy.js on Youtube. I'm not skilled at programming, like, At All! But let me know if there's anything I can do to help this project progress. I'm sure a lot of us would love to try it out. It looks amazing.
  2. http://www.babylonjs-playground.com/#Q3WWIK#1 You could rotate around the X-axis in World space? The Y-axis rotation will still have to be in Local pace, though, otherwise you'll face the same issue. What about the rotation, when you are facing the poles? Oh, and if you rotate the sphere 180 degrees, the keys and the rotation will be reversed.
  3. A few additional parameter have been added. You can now change the height, width and length of the vehicle body, the radius of the tires/wheel, the distance between front and back wheels as well as the horizontal distance, which wheels to brake on(rear, front all 4), which wheels to steer with(same) and which wheels to apply forces to(same). The button is now called 'CREATE' and is at the top of the gui. Press H to hide the dat.gui element. http://www.babylonjs-playground.com/#1PX171#17 And a bus: http://www.babylonjs-playground.com/#1PX171#20 More wheels could easily be added to create a proper truck.
  4. This is a (sort of) port of the Three.js vehicle demo using Cannon.js, in case someone is looking for vehicle physics or just want to play with it. I made some weird choices like sperating the renderLoop and the postStep, and some quesswork here and there. And some options are left out, but can easily be added by looking at the Cannon.js docs or logging the vehicle object itself. This includes ConnectionPoints, which wheels steer, back or front wheels etc. Just play with the options, and press the "Run with Options" in the bottom of the Dat.GUI. http://www.babylonjs-playground.com/#1PX171#9 WASD to drive around. Space to brake.
  5. If you use a physics engine, it is encouraged to use velocities to move around, instead of moving the bodies at some fixed units.
  6. BABYLON.SceneLoader.ImportMesh("test", "assets/", "skull.babylon", scene, function (newMeshes) { Test is not a name you assign the mesh, but a name you specify for the loader to look for, in case you want to import a specific mesh. Null it out instead, like: BABYLON.SceneLoader.ImportMesh("", "assets/", "skull.babylon", scene, function (newMeshes) { To import all the meshes in the file. At least I think it's how it is.
  7. Like this?: http://www.babylonjs-playground.com/#Z7U9QE If you need physics, collision detection etc. you'll need a physics engine, too. Babylon has built-in tools for that. You won't exactly come a long way without if statements and conditions, so if they confuse you, read up on them. There are millions of resources for just that.
  8. Does it help setting: particleSystem.renderingGroupId = 1; ?
  9. Awesome. Just downloaded the source. It looks advanced I remember trying it out some time ago. Less than a year, though. And then recently again, as I made this thread. What turned me off of his way of doing it, was that I needed to unlink the bones, and that would complicate my already made animations. However, it might be possible to create a secondary skeleton with individual bones with no parents, and then link these indivual bones to their corresponding bones in the first skeleton. By doing this, they'll follow the animations, while still maintaining the power to modify the vertices on their own. Now, I guess the reason he did this was, that when you move or rotate a bone, let's say the shoulder, all children will move along according to that bone. So the upper arm, lower arm and hand bones will all move according to the shoulder, and then move Again according to their own bodies in the ragdoll setup. I'll certainly give this method shot.
  10. @BitOfGold Gave the IKController a go, and ended up with the following raggardoll: http://www.babylonjs-playground.com/#0DE8F4#4 (Hold down A when you want to run the simulation) It needs tweaking, but it's getting better The dude model has a bit too many bones in the head area, but as I have some issues using IKControllers using my own model, I'll have to figure that out first. So the head isn't moving at this time. But the upper body is. Here's one with a little added impulse: http://www.babylonjs-playground.com/#0DE8F4#5 The code might be a bit too prototype-ish. Making the constraints more rigid messes with the realism, so a stiffy doll seems easier to tweak.
  11. Oh shit. Showing the relevant code of your search query, before having to open the PG is a very welcomed feature. I didn't request it. Heck, I didn't even even know I needed it. But it makes searching the Playground a hell of a lot easier and quicker, too. Awesome
  12. Can't you just make a function like: var loops = 0; var runAnimation = function(){ if(loops <= 5){ scene.beginAnimation(mesh.skeleton, 0, 30, false, 1.0, runAnimation); loops++; } } Or are you looking for something else?
  13. The mesh(es) is/are imported and referenced in an array called newMeshes. newMeshes[0].position.y = *. Or char = newMeshes[0] etc.
  14. If you manage to get something that looks even remotely right, let me know. This is the best I've got so far: http://www.babylonjs-playground.com/index.html#XVETC#14 (You may have to quickly press A for it to play properly. No idea why, have't had time to look into it). Code is really messy, but the effect looks kind of okay.
  15. Would it be possible to instead use scene.pick()? I'm not sure if the rayHelper can be used with that function, but it (projects?) a ray from the camera. http://www.babylonjs-playground.com/#KNE0O#25 Check the console and aim for the box or the ground plane. Edit: Oh, I missed the fact that you wanted the ray to be visible.