Raggar

Members
  • Content count

    297
  • Joined

  • Last visited

1 Follower

About Raggar

  • Rank
    Advanced Member

Recent Profile Visitors

1,950 profile views
  1. I was wondering whether or not it's possible to get the world/3D positions of different textures using the TerrainMaterial. Let's use the TerrainMaterial PG as an example: https://www.babylonjs-playground.com/#E6OZX#7 Now, let's say I want to place meshes wherever the rock texture is used on the ground mesh, programmatically and automatically. I don't seem to find any relevant references or functions in the object, and can't think of a proper way without loading the image separately and somehow map those colors to the ground positions.
  2. hoverboard setup

    What a failed attempt: http://playground.babylonjs.com/#G2R4DU Would break your leg in an instance http://playground.babylonjs.com/#G2R4DU#1
  3. skeleton animation for AI

    Well, of course. Don't stay up for too long, Mr. Raggar! I just thought using the actual property would be very useful. Then you could call the function to change position, rotation etc. without having additional check in place in the function itself.
  4. skeleton animation for AI

    http://playground.babylonjs.com/#C3KABR#2 Hmm. Any idea why the following doesn't work? http://playground.babylonjs.com/#C3KABR#3
  5. skeleton animation for AI

    Well. The timeStamp only needs to be set once, and then updated with the currentTimeStamp. timeStamp = currentTimeStamp; No idea why I didn't do that in the PG. This way, you only need to call getTime once per function call. Better yet, once per frame. If you calculate the delta once, you can use it for all your AI's. @aWeirdo
  6. skeleton animation for AI

    You could use some sort of delta. Either based on time or frames. Here's a quick example of using time, which should also be frame-independent: http://playground.babylonjs.com/#C3KABR
  7. Custom skybox in playground?

    You have to use the "raw.githubusercontent.com" link. Click on one of your images to open it on Github. Then right-click the image and click "view image". Now you have the proper URL: https://raw.githubusercontent.com/BabylonJS/Website/master/Assets/skybox/nebula_*.jpg https://www.babylonjs-playground.com/#AJ08FD
  8. How to Clone a Loaded Mesh on Demand

    If it's undefined, it might mean that the model hasn't been loaded yet. Make sure all models have been loaded before allowing players to join.
  9. How to Clone a Loaded Mesh on Demand

    Something like this?: http://www.babylonjs-playground.com/#8XUNI#5 I pushed the loaded mesh into a global array. This way, the mesh can be called from any function outside the createScene, successCallback etc. functions. (For instance, in your socket events). I assume your players don't connect until After the scene has loaded, but you could simply check whether or not the model is populated in the array. If not, then load it (again). It does look like the clone function automatically enables the mesh, so no need to setEnable(true).
  10. 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.
  11. 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.
  12. 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.
  13. 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/
  14. Ahh. Nice! http://playground.babylonjs.com/#94EHM5#1
  15. 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?