Search the Community

Showing results for 'minimap' in content posted in Questions & Answers, Announcements, Bugs, Demos and Projects and Content creation (3dsMax, Maya, Blender, glTF).

Didn't find what you were looking for? Try searching for:

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 66 results

  1. Hi again, I have recently run into a wall that I could use some help with. I am using an advancedTexture for a GUI. The problem is, that when I add a second camera to the scene as a minimap, the GUI no longer receives pointer events. Here is an example As you can see, the button doesn't work. Obviously I need to get the buttons working again. If I remove the minimap, everything works as expected. Any ideas? Thank you
  2. Hello, I'm currently developing a FPS and need a minimap. I thought it would be possible to render the scene with a different camera to a second canvas but found no solution. Then I thought an image from above would be enough but BABYLON.RenderTargetTexture can't handle a second camera? What would be the best solution for implementing a minimap in the game? Thanks for every answer, Simon
  3. In the following PG the Minimap camera stay always under the Main Camera. If I switch the order how the cameras are added in the active cameras (line 30 <-> 31) the minimap appears over the main camera BUT the ONMOUSEOVER stop working (mouse over the red sphere) Can the Mouse events work in both camera? What for are there lines? mm.renderingGroupId = 1;mm.layerMask = 1;
  4. Hi guys, I missed you ) I have a new little problem, and I hope that you can help me. I have this example to support me: I want to create a minimap, but I don't know how to positionate it in front of scene map. The minimap is back of scene, in bottom-left. Thanks a lot.
  5. My goal is a 3d minimap or radar. My starting point was to use a simple arrow as a compass or objective pointer, which I tied to the camera and positioned appropriately: compass.parent = camera; The problem is when the resolution changes, ex. going from landscape to portrait mode, my compass in the top left disappears off the screen. So, is there a preferred way to position meshes relative to the screen, as in a UI element? I've considered using a second camera and setting up a room with just my minimap elements, or installing a second canvas with absolute positioning relative to the page, but these don't seem so great. I would also like to have my camera pan away from a character until that character hits the edge of the screen, which would prevent further panning in that direction. These seem like a similar problem, perhaps in reverse. Maybe each frame I shoot a ray into my scene and test for collision with the character? Or set up a plane to shoot a ray at to determine the correct world position to correctly place the UI elements/stop the camera with the given viewport? Any insight is greatly appreciated!
  6. Just for testing purposes, I tried this with a 512x512 heightmap and these settings: { width: 512, height: 512, subdivisions: 512, minHeight: -56, maxHeight: 39 } I also turned off the minimap and (grasping at straws) set the specularColor to black on the ground and water textures. The scene is basically as minimal as I can possibly make it. None of that seemed to affect the frame rate. It still sits in the low teens, though it seems to run faster if I pull the camera back away, even though that results in many more polygons in frame. Counterintuitively, the more of my little island is in view (due to increasing altitude) the faster the framerate gets, on up to 40-60fps. The only change I made that did help the frame rate at ground level was deleting the water ground plane, which seems like it pushes the framerate into the high teens / low 20s. But at that point it's hard to tell if I'm looking at the same part of the map, so I can't be sure that's apples-to-apples. Weirdly (to me), increasing the subdivisions in the water plane also helped, allowing me to leave it in but keep the upper-teens framerate. I've also noticed that if I stop moving the camera, after a few seconds the frame rate will shoot up to 60 and I can rotate the camera at that location without loss of performance. But as soon as I move the camera, it dives back into the teens. This same computer runs the playground demo for height maps at 60fps without breaking a sweat, so I am pretty sure the problem here is me. If I set my parameters to exactly the same values that demo uses (200x200, 250 subdivisions, 0-10 height, updatable false) I still get high-teens framerates.
  7. The GUI texture should be in the foreground, but it does not work on a Viewport. It is the Viewport that is always at the forefront. On my project I have a minimap with zoom and delete button that overlaps the viewport, but the button is not in the first plant:
  8. This is because the minimap layer is rendered after everything else so it will overwrite your GUI A fix could be to have the GUI on the same layerMask:
  9. Thanks @Dad72 and @Ravi for the feedback sorry for the delayed response (I was out for a week+), Snapping: this is possible today via var gizmoManager = new BABYLON.GizmoManager(scene) gizmoManager.positionGizmoEnabled=true; gizmoManager.gizmos.positionGizmo.xGizmo.snapDistance = 0.3 gizmoManager.gizmos.positionGizmo.yGizmo.snapDistance = 0.3 gizmoManager.gizmos.positionGizmo.zGizmo.snapDistance = 0.3 but I will add a helper method for this gizmoManager.gizmos.positionGizmo.snapDistance = 0.3; Possibilities to define euler: In Babylon, I believe it is recommended to always use Quaternions instead of euler angles. If you wish to continue using euler angles you can always use the methods to convert Quaternions to euler and vice verca. BABYLON.Quaternion.RotationYawPitchRollToRef quaternionObj.toEulerAnglesToRef Add layerMask to the gizmo: One of the goals when creating the gizmos was to avoid modifying the existing scene. To avoid this it uses the UtilityLayerRenderer which creates another scene that is overlayed on top of the original. Because of this, unfortunately, I don't believe the layer mask would have any effect. What you could do to work around this is to use another UtilityLayerRenderer for the minimap and place on the minimap contents in the UtilityLayerRenderer's scene. Triangular equal scaling gizmo: @ravi Sure I will take a stab at creating a new gizmo type for this. Hopefully these resolutions are acceptable.
  10. Just from *.gif you shared: you projecting from 2D to 2D. And in this case ,it is a basic Javascript you can copy, paste from Stackoverflow. Map one range to an other. Assuming you have a second canvas, like a minimap situation, you get you mouse coordinates (w: 50px h: 50px) and your football/soccer field (BabylonJs plane) is the canvas you "paint"/project the mouse position ( w: 200 babylonjs3Dunits, h : 200 babylonjs3Dunits ). So the coords on the minimap needed to be “screched”/mapped to the BabylonJs Plane, very simple, (3 lines of code) The 3D and the 2D world thing, you are talking about, - is usually needed if you want to pic an 3D Object in 3D Space. I’m sure someone will answer this one properly soon, meanwhile you can use the BabylonJs Forum Search ( right corner the beneath login form ). I see this question pop up like every 2 Weeks.
  11. Yes the appearance is much better like that. For the code to use, can be a question of current usage habit. [edit] Snap mode does not seem to work with the 3 axes (why could not this work also with the 3 axes?) : I find it regrettable that the rotation is with rotationQuaternion not not the possibilities to define euler. it was for me a preference to use euler, because I block quaternions on my meshes with mesh.rotationQuaternions = null; because I have to do it like that on my characters to control them more easily. And I recover in an editor the data euler and not quaternion. We can add layerMask to the gizmo ? because I have scene that uses it and suddenly it could be useful. In the case of using multi window to make a minimap, I would not want the gizmos to be displayed in the minimap, so LayerMask is useful for that. It would also be interesting if you could add to gizmos the ability to move multiple axes at the same time for position and scale. For example by adding a small cube in the center of the gizmo as can be seen on the images of examples. This can be very useful for resize the 3 axes at the same time or move 3 positions by selecting this center Thank you
  12. I worked before on a city simulator before but unfortunately my motivation fizzled out and I never really continued with it, because there were some issues such as intersections for which I never got a good solution. After a while I stumbled accross Mapzen, which mainly uses openstreetmaps data and decided, why not combine it with babylon. I'm not the first one to try it , but still doing it for fun It uses SPS, but the SPS.buildMesh() function is kinda slow which causes the initial load to be rather slow. Here's my rendition (still alpha/beta) of 3D openstreetmaps with babylon.js with some examples (only tested in chrome desktop and android): newark liberty airport french alphs naarden vesting hong kong (elevation data is not very accurate for asia unfortunately) Need good gfx card: lower manhattan manila The search currently uses openstreetmaps search which is kind of wonky. If you want to search a city, it's better to search a landmark within that city. Current issues: Is there any way to speed up the initial buildMesh() call for SPS? I remember reading something about offloading SPS tasks to the worker? I can't get the minimap thing to work.. how to copy a mesh to another scene?
  13. You mean using my double array to create a dynamic texture? Are dynamic textures GPU accelerated? This double array of mine is generated by my random labyrinth generator algorithm, so what I'm trying to do here is create a minimap
  14. i was testing this way to do a minimap , but i saw that when you intersect another object the minimap looks like this , any ideas how to fix that to avoid that ? or it is better using the viewport way :
  15. I want the width and height of the rects to be the same and I also wanted to use percentages in order to have rects proportionate to the window's size. To clarify, I want to create a minimap for my level. I used your last method, and it's a bit off for me. There's gaps between the rects that look like rows and columns
  16. I have a UI element, but for some reason the elements duplicate over to the 'minimap' overlay viewport. How can I prevent this behavior?
  17. Hy there! sorry with my ton of questions today! i've been trying to isolate the gui from the minimap but using layermask doesn't prove effective
  18. Looks like the minimap getting obscured can't be worked around as the render order is purely the index in activeCameras array: There's another new question about GUI pointer events off, so wonder if these are related.
  19. I wonder if minimap is picking up pointer event... (oversized overlay)? Idk.
  20. If I push the minimap first, as you did in the playground ( ), the minimap gets obscured by objects rendered in the second camera. I need the minimap on top, that is why I pushed it second. I think it could be a bug, as the buttons graphical portion is displayed in the correct place. Surely the area responding to pointer input and the area used for displaying the button should match. Thank you for your help brianzinn.
  21. I am using the advancedTexture GUI to make some controls in a scene. In the full scene, I am using the layerMask to separate objects between the main camera and the minimap. The layerMask does not appear to be respected for GUI components. This playground has the ground plane and the button in the same layerMask(2). the ground plane is not rendered, but the button is. This is not what I expected. Is it correct?
  22. I want to remove the GUI from the second camera I am using in my scene. I have a Point Of Interest App that I am building. On each point I have a mesh that is connected to a button through the GUI. i want to hide the meshes in the main camera, and hide the GUI elements in the minimap camera. I was using 2 meshes and layerMasks, one mesh for each camera, but The button meshes weren't as clear as I would have liked, so I changed the setup.
  23. Hi @gzlock, this PR adds a toggle to display/hide the minimap :
  24. Sorry, I didn't receive a notification, so apologies for the late reply. Thank you No problem, but I might get a better url if I'll get more serious about this project lol. I'm not sure how to repro the minimap issue in the playground since I'd need more than once <canvas>. I basically want to have two instances of the babylon engine, two separate scenes and then copy meshes from scene one to scene two. I tried to just push() the meshes to the scene2.meshes[] array but that didn't work.. Thank you for the suggestion I tried it, unfortunately I think maybe my babylon.js is outdated (3.0), the updatable flag didn't seem to do anything. When doing a performance check in Chrome during the building of SPS, the top function are javascript internals: GC, typedArrayConstructionByArrayLike, bufferData, push. the top non-internal function is SPS.setParticles(). PS. any chance SPS could support a second UV channel? I always need to manually edit babylon.js to add UV2 to the SPS, which makes it quite bothersome for me to upgrade