Raggar

Members
  • Content count

    288
  • Joined

  • Last visited

1 Follower

About Raggar

  • Rank
    Advanced Member

Recent Profile Visitors

1,685 profile views
  1. The new Babylon Viewer

    I can see how this could be useful in a lot of applications other than games. It seems to have an issue with fullscreen in Firefox(56.0.2 - 64bit). Works in Chrome.
  2. Demo sourecode

    I copied some of it for another thread: http://playground.babylonjs.com/#J89UGC#4 It has gravity and the heightmap. It is click to move, but using the original source for reference, it shouldn't take long to recreate.
  3. Scaling Uploaded OBJ mesh

    The maraca reference isn't the imported mesh, but a task of the AssetsManager. So the .scaling property is there, but since it's no mesh, it's not used to do anything. Take a look at the example from the docs: https://www.babylonjs-playground.com/#ZJYNY#0 Aaaand Raanan beat me to it.
  4. What's next?

    Do you know where workers could be useful other than physics? Me and @BitOfGold did some basic testing of sharedArrays and CannonJS, but I wonder what else could be "off-loaded" to separate threads. https://jsfiddle.net/gak8320L/15/
  5. Ahh. Nice! http://playground.babylonjs.com/#94EHM5#1
  6. I haven't played SR, but by the looks of it(Google searches), you might be able to use morph targets and different meshes for hair styles. Then different textures as well as skin colors for variation. Look at this example for bone deformation: http://playground.babylonjs.com/#94EHM5 I chose to scale on all axis, although you can scale one at a time. There's an issue with keeping the scale when playing an animation, though. Hmm. Maybe @Deltakosh or @adam know why starting animations reset the scaling on bones. Maybe it's simply not possible?
  7. How to move the camera in front of a mesh

    Maybe you could create a playground example to show us what you want? Here's a simple example: http://playground.babylonjs.com/#GSPKL6 But that doesn't take camera rotation into account, and only changes the camera's X-position.
  8. 2.5D platformer?

    Here's Schteppe's Platformer example with BabylonJS(top) and Canvas(bottom). Once again WAD to jump/left/right. https://jsfiddle.net/oagn4jvz/6/ So it is certainly doable. But whether or not it's better than simply limiting z-axis velocity/position in a 3D physics-engine. Well. I have no idea. It's a bit messy, and uses 2 separate loops, but you get the idea.
  9. 2.5D platformer?

    You might be able to use a 2D physics-engine like the following(p2.js): https://jsfiddle.net/oagn4jvz/2/ First time trying out p2.js, so it does have some odd behavior. WAD to jump/left/right.
  10. I think shadows have the right balance between complexity and ease-of-use. It does take a bit of tweaking to get right, but this depends on the scene, shadowmap-size, objects etc. My first approach was to let the light follow the character mesh. This allowed some very detailed and realistic shadows. Currently I've turned away from this approach to have a static light and worse shadows. I prefer this way, as the shadows are still add some depth to the scene. normally, I'd think the first approach would be preferred due to performance, at least in WebGL/BabylonJS. After all, how often do you need detailed shadows outside the camera's view.
  11. Oimo.Body

    1) Yes. The API has changed to: sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, { mass: 1, restitution: 0.3 }, scene); 2) You can do both. But physics-engines prefer forces or impulses. You Can change the positions, but you "might" get into various issues with clipping through objects and the sorts.
  12. Could work: http://playground.babylonjs.com/#J89UGC#1 I wonder what the performance gains are, compared to using a physics-engine.
  13. This is one way of doing it: http://www.babylonjs-playground.com/#3F5YVW#3 Collisions depend on whether you need a real physics engine, BabylonJS' collisions or you own implementation. I think physics are a bit overkill for a simple RPG, though.
  14. How switch material by button click?

    He seems to be using the skull model from the BabylonJS assets. I'm not sure what's going on here. Look at the following PG: https://www.babylonjs-playground.com/#D13XH6 Changing the material/texture, only changes the color while something called vertexColors are used for the blue-ish parts of the skulls material.