boucher

Members
  • Content Count

    10
  • Joined

  • Last visited

  1. Yes, nice docs and an active community are reasons I would choose an API. I was under the impression that the near plane of the frustum is basically synonymous with what is seen on-screen with the view-port. Setting camera.maxZ brings the near plane closer for some reason, but obviously ruins the view distance. Maybe I am using the wrong vocabulary or something, it seemed pretty basic to want to position something relative to the camera with regards to the view port. Anyways, I'll stop back when I work out something I like, if nobody else has any good ideas. Thanks! Edit: Maybe I should set up another scene and camera to lay over my existing scene? Is that the right sort of thinking?
  2. camera.isInFrustum() is a nice helper but feels sloppy for collision, so I want to check myself against the plane. This playground shows me the planes from Frustum.GetPlanes() which return in the order [far, near, right, left, bottom, top]: https://www.babylonjs-playground.com/#LXZPJK#81 My near plane is a million miles away for some reason? I think I can use that as a starting point to build a quad that stays in front of the camera to base my UI elements on. But again, any insight is welcomed. Something like the solutions here might be useful: October 4, 2017
  3. The project is here btw:redacted I am looking at the blue arrow top left.
  4. 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!
  5. I think you would have to build in your own compass to stay oriented to the real world. It looks like it can already be done on Android, but don't hold your breath for Apple PWA support: https://caniuse.com/#feat=deviceorientation https://caniuse.com/#feat=gyroscope https://caniuse.com/#feat=magnetometer https://caniuse.com/#feat=accelerometer
  6. Thanks so much! @Deltakosh engine.getCaps().highPrecisionShaderSupported = false´╗┐;´╗┐ got me back up and running for now.
  7. I just got a new LG K30 android phone and my project shows all surfaces as flat black without lighting. The latest chrome firefox and opera all show the same. The train demo and Cornell box demos appear fine, but every other demo with lighting that I've tried displays the same behavior (including my own project t.t) Android 8.1.0 Any insight greatly appreciated!