Raggar

Members
  • Content count

    220
  • Joined

  • Last visited

About Raggar

  • Rank
    Advanced Member

Recent Profile Visitors

1,117 profile views
  1. As @jerome said, just create a dummy object and parent the camera to it. Then you can use the dummy as any other mesh. https://www.babylonjs-playground.com/#85JMWB#3
  2. I think it might be due to the Heightmap/field. Here are 2 quick tests, both creating 200 spheres.. 1) Impostor system using a normal CannonJS ground/infinite plane: http://playground.babylonjs.com/#MN5IV7#2 2) Native CannonJS, ground as well: http://playground.babylonjs.com/#H1CEDV#1 As Wing mentioned, if you need hundreds, or even thousands, of individual bodies, you'll hit the CPU hard. You might instead have to do some trickery to make it appear as you have actual collisions. Another interesting thing that might potential be usable in the future, is a project by @schteppe (The creater of CannonJS): https://github.com/schteppe/gpu-physics.js https://schteppe.github.io/gpu-physics.js/demos/boxes.html I have no idea whether this would eat too much GPU resources, though. It would need to be modified to use BabylonJS's renderer, though. Nothing I know anything about. I'm not even sure this would be beneficial in game development.
  3. Have you had a look at this thread: ?
  4. You could also try the Spaaace example of Lance GG: https://github.com/lance-gg https://github.com/lance-gg/spaaace It should be close to what you want.
  5. If you don't need to ping the server and get the latency that way, you could simply use one of the Many geolocation services or libraries.
  6. Have you seen this example: http://www.babylonjs-playground.com/#7ZDKA0#4? The animations, baked or not, must be stored somewhere. And the current frame of the animation playing likewise.
  7. Works indeed. Very nice. I'll see if I can recreate the old man using the new function at some point when I have more time. Here's a version of the demo in native CannonJS. It has replay issues, but other than that, works as expected. http://www.babylonjs-playground.com/#G9ZBQ1#11
  8. Here's another way of doing it: http://www.babylonjs-playground.com/#7ZDKA0#4
  9. Will try it out as soon as the PG is updated or the preview version is built.
  10. Are you planning on adding client-side prediction?
  11. I honestly can't take credit for any of it. It goes to Samuel. Right now I'm having trouble getting the native CannonJS version to roar. I can easily create decent ragdolls using ConeTwist- and HingeConstraints, but for some reason they are ....twisted when I apply them to the current project. Starting from scratch (Like the very first PG in this thread) does not have the same issues. Weirdness. I'll keep at it, and maybe start over at some point. I'd like to try one of the methods mentioned above. Let's say I have a model cut into limbs. Shoulder, upper arm, lower arm and hand. All 4 have bones influencing them. Now, if you shoot the lower arm, the lower arm and hand meshes are detached from the skeleton to create some dismemberment. But that would give like a minimum of 15 models, and I'm not sure whether or not it would be possible to merge these and keep the weights of the vertices, and then still be able to pick these sub-parts and remove them from the merged mesh.
  12. Playground created by copying only what's needed from the ported original. http://www.babylonjs-playground.com/#G9ZBQ1#6 Press H to Hide/Show boxes. Press P to toggle through the different animations. Press G to apply gravity.
  13. Yo @Samuel Girardin The demo at http://92.222.89.13/oldman/ is in fact using CannonJS. I changed it from OimoJS, as I prefer CannonJS myself. It doesn't come even close to your original demo, but it works. It has some performance issues when doing multiple ragdolls, as well as needing some limitation of the joints. That's why I'm trying to recreate it in the playground, to get Just the basics running, and going from there. I believe http://www.babylonjs-playground.com/#VADCKV#10 is the least amount of code I need to make it work, although it doesn't at this point But I still think it's very important to get a working, simple example of a ragdoll on the Playground, as this is essential in a game engine, and from what I see, most people using physics in BabylonJS use CannonJS.
  14. @adam I am using @Samuel Girardin's code, which works in a local project, but somehow doesn't when I try in the playground. The example I uploaded this Friday works, but not the tests from the Playground.
  15. Oh snap. Must be because babylon automatically updates the matrices while playing an animation. And I didn't stop the animation, I simply started it from the current frame to the current frame. Edit: Hmm. Didn't fix the issue. http://www.babylonjs-playground.com/#VADCKV#10