trevordev

Members
  • Content Count

    119
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by trevordev

  1. trevordev

    VR fixed sight

    Give this a shot https://www.babylonjs-playground.com/#Q1VRX3#10 Also note that using babylon objects ._variables are private which means they should not be used in production code and could be changed in the next release.
  2. trevordev

    VR fixed sight

    Try this https://www.babylonjs-playground.com/#Q1VRX3#7. It looked like your issue was that sight was still a child of the camera. I undid that and positioned it at cameraPos + cameraForward*distance and it worked.
  3. trevordev

    Merge mesh and multimaterial

    Thanks for the PG, from the implementation of mergeMeshes it doesnt look like merging meshes the way you expect is supported right now. Created github issue to track this: https://github.com/BabylonJS/Babylon.js/issues/5197 In your playground you are merging 2 barrels that have the same material on both of them, is merging 2 different objects with different materials also a scenario to you?
  4. trevordev

    VR fixed sight

    @devAxeon Valid concerns. There is an odd quirk with the webVR camera that it's position is not actually your head, instead it is stationary and it's sub cameras are the ones that move (left/right eye cameras). See https://doc.babylonjs.com/how_to/webvr_helper#accessing-vr-device-position-and-rotation , I would update the position of your plane on every frame like done in the example there. This is definitely not ideal as you will have to have separate logic for a vr camera vs non vr camera. The way onEnteringVR looks to be designed is that it fires right before VR is entered. This also seems odd to me, I can add an onEnteredVR event if desired. With the introduction of the webXR apis/phasing out of webVR coming to browsers we are thinking of adding new webXR support (Maybe as webXR camera) to babylon that addresses many of the existing concerns raised about the webVR apis. https://github.com/BabylonJS/Babylon.js/issues/3899 .
  5. trevordev

    Get mtlib from OBJLoader

    @bghgary do you know the answer to this?
  6. To replace onAfterActiveMeshesEvaluationObservable for your scenario you could have a flag that states if a new mesh has been created and use scene.on(Before/After)RenderObservable to check if a freeze is needed.
  7. trevordev

    Babylon crashes in fullscreen mode

    Would you be able to create a repro on the playground? https://www.babylonjs-playground.com
  8. trevordev

    Ambient Light Discussion

    Ambient light is something I also found as a difference in when switching to Babylon from THREE. I'm not aware of any direct mirror in Babylon to achieve this, I've found setting on every material like suggested above to work but you could also try modifying a hemispheric light's color properties to try to simulate ambiance eg. https://playground.babylonjs.com/#UKNERM#31
  9. trevordev

    Cancel a merge object

    I don't think support for this is built in. You could try to look at the use your own merge function from https://doc.babylonjs.com/how_to/how_to_merge_meshes and instead of combining meshes try to separate them.
  10. trevordev

    Merge mesh and multimaterial

    Would it be possible to repro what you are seeing a playground I can take a look at? Why is the merge required as apposed to creating a new mesh with the objects as children? Or is this for performance reasons?
  11. trevordev

    Gizmo and pivot of meshes merged

    To get the gizmo in the right position again, maybe you could check if the selected mesh has a parent and use that if it exists to attach the gizmo. Can you provide more details about what you are trying to build? Are you looking for the ability to group any number of objects and move them around with gizmos or something else? How would you like the serialization to work?
  12. trevordev

    Gizmo and pivot of meshes merged

    Due to Babylons current implementation of pivot points not supporting any order manipulation operations, I would say using the pivot for this would not be supported. Would using a parent mesh as the pivot point work for your scenario? See this playground: http://playground.babylonjs.com/#8GY6J8#163
  13. trevordev

    Trying to freeze VR camera position

    @devAxeon created a new PR for this here: https://github.com/BabylonJS/Babylon.js/pull/5158
  14. trevordev

    About creating dynamic avatars

    I know babylon supports cloth simulation via physics plugins like cannon https://www.babylonjs-playground.com/#7N1BRU#0 but I'm not sure the performance and quality would meet your scenario. @PatrickRyan do you have any ideas how this might be approached?
  15. trevordev

    Events for gizmo controls.

    The all direction option that @Varsha Kamble mentioned is actually private. I will make this public in the next build and it should work via gizmo.uniformScaleGizmo.dragBehavior.onDragEndObservable.add(dragEnd)
  16. trevordev

    Cannot open in VR

    I'm using a GTX 770 in a desktop computer. If it works on the 3.2 version of babylon it may be a bug, can you confirm if it works there? If it also doesn't work there it is most likely a driver issue.
  17. trevordev

    Cannot open in VR

    Very weird that I can't repro it on the same browser. You could try commenting out portions of the playground until it works to try to isolate the line of code that breaks it. Also can you confirm that https://www.babylonjs-playground.com/#TAFSN0#2 works.
  18. trevordev

    Cannot open in VR

    @brianzinn if I run BABYLON.Engine.LastCreatedScene.meshes.forEach((m)=>{m.name = ""}) in the console on https://brianzinn.github.io/create-react-app-babylonjs/meshMashup before entering vr it works for me. Also to get rendering to work on the webpage while in vr, when creating the engine do it with preserve stencil buffer eg. var engine = new BABYLON.Engine(canvas, true, { stencil: true, disableWebGL2Support: false, preserveDrawingBuffer: true })
  19. trevordev

    Cannot open in VR

    I have an Acer WMR headset with Microsoft Edge 42.17134.1.0. Does it still not work for you in the playground? Do you see any error in the console?
  20. trevordev

    Cannot open in VR

    @brianzinn https://www.babylonjs-playground.com/#0JMGVC#11 works for me. When I tried https://brianzinn.github.io/create-react-app-babylonjs/meshMashup, it did not work and from looking at the console error it looks like it comes from this line in vrExperienceHelper (mesh.name.indexOf("gazeTracker") === -1 which is used when when doing something related to the ray casting. mesh's name is not nullable so perhaps one of the mesh initializations in your code does not provide a name (are you writing in js or ts as I would expect a warning/error in ts). If somehow this is a valid use case I could also rework the helper logic to treat it as nullable. Also from playing around with the project (very cool by the way ) I noticed the gui keyboard depth doesn't always work as expected (occlusion not working properly), is this intended? Otherwise it might be a bug in how the gui is using the renderLayer.
  21. Hey, Gizmo's (position, rotation, scale, bounding box) and Mesh behaviors (pointerDrag, sixDofDrag) have been added to the latest Babylon preview. Gizmo docs Mesh behaviors docs GizmoManager playground GLTF bounding box playground Please let me know if you have any feedback. Thanks! 2018-07-06_10-08-12.mp4 2018-07-06_10-11-54.mp4
  22. trevordev

    Gizmo's and mesh dragging behaviors

    Do you have a playground you are referring to? Are the events in this PG not what you are looking for https://playground.babylonjs.com/#6E4LSB#15 . Or are you using the gizmoManager I dont believe the dragging events are exposed there but I can make this public if its required.
  23. trevordev

    About creating dynamic avatars

    @dsmanare you looking for something that looks along the lines of this? http://playground.babylonjs.com/#0K8EYN#0 or more complex clothing? @kcoley any ideas on how to do this?
  24. trevordev

    Babylonjs and dependencies in NPM

    Yep matching NPM versions is likely a good idea. Glad you managed to get it working. For me, in a new project running: npm install babylonjs babylonjs-gui babylonjs-materials or npm install babylonjs@preview babylonjs-gui@preview babylonjs-materials@preview for the latest version, does not spit out any dependency errors
  25. trevordev

    Blocks become fuzzy?

    It looks like the shader rounding works differently on different hardware so somehow the normals are not equal to exactly 1 or -1, giving it some room for rounding errors worked see: https://www.babylonjs-playground.com/#2IFRKC#55