ParadoxMaster

Members
  • Content Count

    16
  • Joined

  • Last visited

  1. Thanks for your replies! It's strange, but I can't reproduce this situation anymore... Without any significant changes in the code. I will describe in more detail what is happening in my code if it appears again. About my render loop: i use it for the vector calculations for moving my characters. Like this: move(deltaTime) { let ratio = deltaTime * this.FPS / 1000; let alignedEps = this.epsVector.scale(ratio * SPEED); let nextPosition = this._mesh.position.add(alignedEps); let nextNormale = this.targetPos.subtract(nextPosition).normalize(); if (Math.sign(nextNormale.x) != Math.sign(this.normale.x) && Math.sign(nextNormale.y) != Math.sign(this.normale.y) && Math.sign(nextNormale.z) != Math.sign(this.normale.z) ) { // Stop walking; if (this._walkPath.length == 0) { this._needMove = false; this.targetPos = this._mesh.position; this.blendAnim(this.walkAnim, this.idleAnim, BLEND_TIME.WalkToIdle); } else { this._calculate(); } } else { this._mesh.position = nextPosition; } } It's okay? Or may cause this problem? UPD: Now looking at it, I have guesses that a whole bunch of temporary vectors are being allocated here ...
  2. When I run my game in Firefox, after a few minutes of gaming or even just rotating the camera, the FPS in the game starts periodically drops. Of the stable 60 FPS drops by about a couple of seconds to 20-30 or even just stops. And it starts to happen more and more often. To fix this i need to reboot the browser, nothing else helps. I researched in the performance devtools in the browser and found that this is due by "Cycle Collection" process. ( Note: when I start recording performance, all FPS drops disappear, as if I restarted the browser. And I have to wait again for a while before they start. ) Has anyone else experienced this issue? What could it be? Another Firefox's WebGL bug? In Chrome and Edge i have no problems.
  3. Sad to hear .. Your toolkit is a wonderful thing for developing complex 3D games on Babylon. Unity has a very mature and convenient editor for game development. I tried to use BabylonJS Editor, but for now, I think that Unity is a much more convenient way to build large scene, compared to it or even worse, compared to completing all the parts manually in code. Have you tried to contact the Unity team to cooperate? Maybe they can help.. I think that BabylonJS could be a more promising way to create browser games, compared to the existing WASM converter in Unity.
  4. I tried to do it on OSX, and on Windows, and with different versions of the toolkit. Doesn't work anywhere. Maybe there is a bug?
  5. Thanks, I think I realized how to optimize trees using build-in layers. But the video will always be useful to users. You made a amazing and powerful toolkit! The only problem is that there is little documentation and examples, and users need to figure out in many things by yourself. But now I have more questions on another topic: http://www.html5gamedevs.com/topic/41340-textures-for-terrain-painting-in-unity/
  6. Amazing! So simple. This is done in just one short line of code. skull.lookAt(some_coord); https://www.babylonjs-playground.com/#ADGVAT#5 Thanks very much!
  7. Thanks, this way really works. But the use of FacetData seems to me to be overcomplicated ... Is there really no simpler way, for example, using the initial rotation value (put it initially in the direction of the axis) . In my project, the mesh should move between different points and always look in the direction of its movement. Maybe I'm using something wrong.
  8. Not so fast.. I can't get it. I do not understand how to get face normal's direction vector.. I need to create Vertex Normal's Data? And the function for calculating angle between Vectors has a third parameter, it is not clear what should be in it.. There is a playground: https://www.babylonjs-playground.com/#ADGVAT#1
  9. Face is just initial direction of my object without rotation (front side of my mesh). I do not sure understand how i can get the vector of this direction.
  10. Guys, I need help. How to turn the mesh towards the point given by the vector? What method of rotation is needed here? Rotations is my weakness..
  11. Yes, it is about the exporter. I'll wait for this Unity exporter's superhero)
  12. Thanks for your reply. Your examples about dynamic changes in textures on materials at runtime. But my problem is related to the Unity export process, even before the runtime. Exporter does not export other textures after 6.
  13. I do not quite understand if I have a scene with hundreds of identical meshes, e.g trees in a forest. Is there a possible way to have one mesh per babylon scene with many instances? How should such cases be optimized?
  14. If I change the order of the textures or the textures themselves, it always displays only the first 6. The remaining 6 are not rendered. And if look at the generated splatmap, it contains 2 images with RGB channels (2 image * 3 channel = 6 texture variation). I think for 12 textures the splatmap should be another? Even when I create a new empty project, and add only the terrain, more than 6 textures do not work.