• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by adam

  1. SPS
  2. This does look like a bug. I tried a different approach and I get the same results:
  3. Here is the OPTIMIZE_WITH_UV code: and the computeNormals code: 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:
  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:
  8. I have a fix for this and will be submitting the PR shortly. edit:
  9. Try recalculating your normals in Blender. edit: I think letsbro and johnk have the better answers. This doc could be helpful:
  10. I submitted a PR to fix this.
  12. That does look like a bug.
  13. This RayHelper class might be helpful:
  14. Rotate the bone before the scene is rendered. Take a look at this example:
  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: 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: I might need to improve the way the default bend axis is set if it isn't set by the user.
  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: This new fog is a great improvement.
  24. I just added the latest Bone class to the end of this PG: