• Content count

  • Joined

  • Last visited

  • Days Won


JohnK last won the day on July 1

JohnK had the most liked content!

1 Follower

About JohnK

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    England, Buckinghamshire

Recent Profile Visitors

2,766 profile views
  1. Does these help at all?
  2. It is to do with the the order (clockwise or counter-clockwise) the points making the holes are put into the array. Currently the way they are ordered (probably the same way as the outer edges) means that the normals polygonBuilder creates are pointed towards the inside of the letters rather than away from them. Simplest way to correct is to reverse the hole array for (var j = 1; j < letter.length; j++) { var hole = []; for (var k = 0; k < letter[j].length; k++) { hole[k] = new BABYLON.Vector2(scale * letter[j][k][1], scale * letter[j][k][0]); } hole.reverse(); // ADD THIS HERE polyBuilder.addHole(hole); } A depth option would be good.
  3. Terrain Slope Problem?

    In your PG you have a lot of unecessary code, all the canvas and engine bits are dealt with by the PG. Check out Satguru's structure for his PG. Also read this It will help make your PGs more readable for those who want to help.
  4. Best idea is to do a simple playground of two boxes and try it out and see what happens.
  5. Orbiting planets...

    Sorry you have had to wait for a while for a reply. Hope this helps. Babylon.js draws or renders a frame up to 60 times a second. Where and at what angle a mesh is drawn depends on values you have set for position and rotation. RegisterBeforeRender updates any values set within this loop before drawing the next frame. So anything out side this loop is set on the first render call unless registerBeforeRender updates it. If registerBeforeRender does not change a particular value then this remains the same for every frame. By incrementing the angle inside the registerBeforeRender loop this increments the rotation each frame for an orbiting planet.
  6. Hi and a warm welcome to the forum from me. Instead of finding angles you could just make the central box the parent of the orbiting box.
  7. Is there any limit of performance?

    Have you tried fewer segments in your balls? Are you using instances or clones? Have you tried Solid Particle System? 9999 is a lot of balls.
  8. Error not shown in post. What error messages do you get in the console? When logged in the console what value do you get for params[2] ? If this is param[2] is correct url check console to see if it has loaded.
  9. GeometryBuilder (core) Alpha Version

    In playground URLs that load a script now require https so your PG is not working, for me at least. If it is working for others then please let me know how.
  10. How to get circumference of mesh?

    Presuming you mean at least a 60 triangles mesh since in that case the facet triangles are small enough to give a good approximation then how expensive is it to determine the the vertices with a y value close enough to the given y value and that the vertices are consecutive by increasing angle. Remember that the contour of the slice at y may not be anywhere close to a circle and so just finding the diameter is not good enough.
  11. How to get circumference of mesh?

    (The term should be perimeter not circumference but no nit picking among friends). At first I thought I had a solution but it does not seem to generalize. Using raycasting I obtained an acceptable result. Taking a box of side 4 I got 15.9 as the circumference which is pretty close to 16. The lower the increment the more accurate the result. Here is the PG, check console for circumference. However when I tried to do the same thing with the skull the individual picked point results and the circumference do not make sense. According to the boundingInfo the skull is about 46 across which gives a ball park figure of 90 for the circumference at the chosen Y point but I get 9.7. Perhaps I am on the right track and just do not know enough about raycasting to do it properly or maybe it is not the way to do it. Anyway here is PG with skull for what it is worth. (by the way with the skull an increment of 0.01 for the skull locks the browser for a long time). EDIT When I showed the rays I found the mistake, the rays were not in the direction I expected. I had modified another playground but found to get rays in right direction I should just use the forward vector not the calculated direction vector. So this might work
  12. Navigating around mesh face

    This topic may help
  13. For 3 points perhaps either of these is a better option
  14. Player movement problem?

    There is now an easier way to add wheels to a car and rotate using addRotation example with car in this topic
  15. Player movement problem?

    Strange as only you should be able to mark it. However go to first post and edit it. You can then delete or change any tags. Want to know more about car example If you just want more info on multiple key presses let me know.