adam

Members
  • Content count

    1,296
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by adam

  1. SPS http://doc.babylonjs.com/overviews/solid_particle_system
  2. This does look like a bug. I tried a different approach and I get the same results: http://www.babylonjs-playground.com/#1U5GPV#58
  3. Here is the OPTIMIZE_WITH_UV code: https://github.com/BabylonJS/Babylon.js/blob/ba0e165c15a9520ace97c585d30c0dd692cda058/loaders/src/OBJ/babylon.objFileLoader.ts#L335 and the computeNormals code: https://github.com/BabylonJS/Babylon.js/blob/372050675a052c3aa55a0a3e6b77186f51cf2114/src/Mesh/babylon.mesh.vertexData.ts#L2065 Maybe you can see something there that will give you an idea what is causing the issue.
  4. I don't think you need to set the vertices after recomputing the normals. If you have to, VertexData.applyToMesh seems to work: http://www.babylonjs-playground.com/#1U5GPV#52
  5. For those of you following, this issue continues here:
  6. This looks like the same issue you had in the other thread.
  7. It looks like you might need to change the pivot point of your mesh. Try using mesh.setPivotPoint: https://github.com/BabylonJS/Babylon.js/blob/88931762d8200d6d74a7bbbc4e49673994ed6b82/src/Mesh/babylon.abstractMesh.ts#L1555
  8. I have a fix for this and will be submitting the PR shortly. edit: https://github.com/BabylonJS/Babylon.js/commit/016b634e127d5bedd55c7302943618c753086b0a
  9. Try recalculating your normals in Blender. http://blender.stackexchange.com/questions/18886/how-to-recalculate-normals edit: I think letsbro and johnk have the better answers. This doc could be helpful: http://babylonjsguide.github.io/advanced/Normals
  10. I submitted a PR to fix this.
  11. http://www.babylonjs-playground.com/#1EVNNB#52
  12. That does look like a bug.
  13. This RayHelper class might be helpful: http://www.babylonjs-playground.com/#ZHDBJ#36 http://doc.babylonjs.com/playground?q=rayhelper
  14. Rotate the bone before the scene is rendered. Take a look at this example: http://www.babylonjs-playground.com/#1EVNNB#15
  15. Thanks for reporting the bug. I just submitted a PR.
  16. Thanks for providing the example. I think I can come up with a fix for this.
  17. Here is a demo with a simple model that was created in Blender that has bones oriented along the y-axis: http://www.babylonjs-playground.com/#PNJGW#7 Please post an example that demonstrates the issue you're having. You might just need to change the bendAxis. In this example, the second bone is bending on the z axis: http://www.babylonjs-playground.com/#PNJGW#6 I might need to improve the way the default bend axis is set if it isn't set by the user. https://github.com/BabylonJS/Babylon.js/blob/master/src/Bones/babylon.boneIKController.ts#L58
  18. scene.meshes
  19. The user would set it up with an array, but when it is set, you would also be setting something like a private _collisionMask variable that is a number. You would still use bitwise comparision with that. No loop.
  20. I deleted that post, because I didn't want to overwhelm. Since you commented on it, I'll try to recreate it: Better yet, it would be cool if you could keep the numbers under the hood and do something like this: mesh1.collisionGroup = "group1"; mesh1.collisionMask = ["group1", "group2"]; mesh2.collisionGroup = "group2"; mesh2.collisionMask = ["group1", "group3"]; mesh3.collisionGroup = "group3"; mesh3.collisionMask = ["group2", "group3"]; You wouldn't have to do a loop. You could create getters and setters for collisionGroup and collisionMask. You would be doing the same pattern I described above. None of it (such us the power of 2 group numbers) would be exposed to the user.
  21. Both Oimo and Cannon use this pattern. It just makes more sense to me to align with what other physics engines are doing. Maybe some other people can chime in. edit: My quick and dirty example above was to just show flexibility and ease of use.
  22. My vote is for collisionGroups + collisionMasks. Then you can define your groups assign them to meshes and then apply a collisionMask to your meshes. var group1 = 1; var group2 = 2; var group3 = 4; mesh1.collisionGroup = group1; mesh1.collisionMask = group1 | group3; //mesh will collide with group1 and group3 mesh2.collisionGroup = group2; mesh2.collisionMask = group1; //mesh only collides with group1 mesh3.collisionGroup = group3; mesh3.collisionMask = group1 | group2; //mesh collides with group1 and group2
  23. Here is the old fog: https://jsfiddle.net/usxek13s/7/ This new fog is a great improvement. http://babylonjs-playground.azurewebsites.net/#1QMRN6#1
  24. I just added the latest Bone class to the end of this PG: http://www.babylonjs-playground.com/#1ZBQR3#8