trevordev

Members
  • Content Count

    193
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by trevordev

  1. I would manual create a guided graph path through every room. When you need to animate to the next room animate the camera to the node of the graph in the current room and then animate across the graph to the desired room.
  2. trevordev

    Demo with Ammo.js Physics Engine

    @Wingnut My current progress is here: https://github.com/TrevorDev/Babylon.js/tree/ammoPlugin I have basic physics features working right now (Shapes, forces, etc) so this scene is good when using ammo (https://playground.babylonjs.com/#7149G4#0), whats left is collision events, parenting/joint types, gltf support and more testing/examples (eg. driving a car). I still have an issue I am trying to solve: https://github.com/kripken/ammo.js/issues/221 but havn't figured it out yet. I may try to get a PR out soon and add additional requested features as desired. There is a lot of area to cover, I would like to support things shown here eventually: http://lo-th.github.io/Ammo.lab/
  3. trevordev

    Applying physics to mesh and bones

    @Codelain this playground may also be of use to you: https://www.babylonjs-playground.com/#UGMIH#15
  4. Yea, I'm currently investigating a couple physics issues, trying to make some more examples and trying to add ammoJS physics engine support to Babylon. I also came across another playground which has parenting which works for a car which you could take a look at https://www.babylonjs-playground.com/#UGMIH#15
  5. trevordev

    Applying physics to mesh and bones

    Pinging @RaananW if he has any insight here.
  6. Sorry, I'm still not sure I follow. Is there a smaller example you can provide where lookAt does not behave as expected? Other than that from your code I see a lot of assigning quaternions without .clone() so potentially there is a value/reference bug?
  7. trevordev

    Applying physics to mesh and bones

    @codelain In your example you also want to move the objects which doesn't seem supported by this pg: https://playground.babylonjs.com/#PRHF00#11 . There is definitely some weird behavior when trying to do more complex interactions with physics and I am not yet sure how to resolve this type of collision but I am also investigating adding AmmoJS physics to Babylon (https://github.com/BabylonJS/Babylon.js/issues/3079), through my investigation there I'll keep an eye out there to see if your scenario can be supported but for now this may be a limitation.
  8. @atallah salah Yea, for your use case, if parenting is only used to setup the scene only disabling parenting when needing to run physics sounds like a good solution.
  9. Could you share more about your use case? Why do you require parenting? Is this what you are trying to do? https://playground.babylonjs.com/#PRHF00#6
  10. I'm not aware of this being built into the arcRotationCamera. You could use animations https://www.babylonjs-playground.com/#QYFDDP#1 for this but personally I would manually move the position/rotation within an scene.onBeforeRenderFrame callback
  11. Sorry, I misunderstood. Parenting with physics has documented issues when the parent also has an impostor see https://doc.babylonjs.com/how_to/using_advanced_physics_features#ignoreparent. This seems to a limitation with the current physics engines.
  12. trevordev

    Creating a glass sphere type of effect

    Welcome @Neekoy. Do you have a playground of what you have so far? Here is a playground that has a glass sphere https://playground.babylonjs.com/#8MGKWK#0, is this what you are looking for?
  13. trevordev

    Applying physics to mesh and bones

    @Codelain You should try looking at https://doc.babylonjs.com/how_to/using_the_physics_engine . Parenting with physics can have some unexpected behavior sometimes so you might have to experiment with the settings to get it to work.
  14. I'm not sure what your goal is, are you trying to just rotate 90 degrees down and then 90 degrees left? https://www.babylonjs-playground.com/#PP962K#14
  15. @HyHy Im not sure I understand what you want (A playground with the current behavior would be helpful) but for a shotgun spread I would try this https://playground.babylonjs.com/#TG814J here the spread is a set of rays pointing in the z direction, if wanting to show the spread in a certain orientation (eg. from camera) you can rotate the direction by the camera's rotationQuaternion.
  16. Are you looking for it to look like this? https://www.babylonjs-playground.com/#JUKXQD#71 If you use addChild instead of parent =, world position should not change
  17. trevordev

    Mesh generation with a points

    If you know the order you want to walk through the points babylon has "ribbon" builder functionality. See this playground that generates a bunch of points for a portion of a sphere and then creates a mesh out of it https://playground.babylonjs.com/#3YPQZC. If you just want to render those points this thread might be useful http://www.html5gamedevs.com/topic/21963-pointcloud-and-particles-systems/
  18. trevordev

    Babylon and Dashlane issue

    Im not very familiar with dashlane. Do you see this only on your site or does it also reproduce on the playground. My guess is that it is likely an issue with dashlane putting their logo on the wrong elements on a webpage.
  19. @V!nc3r this should be fixed once this PR is merged https://github.com/BabylonJS/Babylon.js/pull/5492
  20. trevordev

    VirtualJoystick on mobile devices

    Sorry for the delay, glad you found a workaround, the virtual joystick creates it's own canvas that is overlayed on top of the entire screen. The reason other buttons stop working is due to them being under the overlay canvas. I updated the joystick class to make that canvas public so you can modify the zIndex of it to position it below any other html element you want to still be active (eg. buttons). See this PR: https://github.com/BabylonJS/Babylon.js/pull/5487/ after that is merged this pg should show how to use it with a button on a zIndex above the joystick https://playground.babylonjs.com/#PRQU53
  21. @V!nc3r This should work now in your PG: https://www.babylonjs-playground.com/#F70HUY let me know if you have any issues with the new behavior.
  22. trevordev

    How to rotate texture with mesh

    @lordTouch You are using a reflectionTexture which will act like an environment so no matter how the sphere is rotated the environment still displays on the sphere the same way. Using diffuseTexture instead like NasimiAsl shared should work.
  23. @timetocode Would you be able to share your model file? It sounds like its the only think that is different between the playground you used and your repro. Off the top of my head there might be an issue when using low resolution shadows with small objects. Also you could try raising/lowering your model closer to the ground.
  24. trevordev

    VirtualJoystick on mobile devices

    Will do, created https://github.com/BabylonJS/Babylon.js/issues/5467 so I don't forget
  25. trevordev

    Life Cycle of an AssetContainer

    @SpaceToast Sounds like a missing feature. I can add this, I guess I've always manually disposed when working with pretty simplistic assets. Yes please do create a bug for your issue if you have a good repo and I can look at that as well. Created this to track the dispose: https://github.com/BabylonJS/Babylon.js/issues/5456