• Content Count

  • Joined

  • Last visited

About distraub

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @rjeThat is part of the playground system though, not part of this particular playgrounds code.
  2. It looks like the raising CPU issue may have been a heat issue on this machine. I am still not sure what from that playground would drive it so hard. Do you have any optimization recommendations to curb cpu usage on that playground?
  3. I am getting pretty high CPU usage in this playground and can't figure out exactly why. When I profile most of the time is spent in _renderForCamera https://playground.babylonjs.com/#HRYQ1L#20 I was getting 40-42% cpu, but leaving it for a little while the cpu hits 100%+ Any ideas on what I can do would be apperciated.
  4. Thank you @Amarth2Estel This does solve my issue, if I use multiPickWithRay and then check for the id of my mesh, then it works as expected. I was hoping intersectsMesh would work the same way. Here is an example https://www.babylonjs-playground.com/#KNB069#3 If you intersectsMesh with those coordinates it seems to use the other end, which almost looks like it is shooting the ray from the target to the source and using that picked point.
  5. I am hoping someone can take a look at this, and let me know if I am using it wrong. I have 2 spheres that I have attached Rays to, they are both shooting at a target, and there is a large sphere in the way, called earth. When I change the position of the spheres, the pickedPoint that is returned by hitInfo on the Ray.intersectsMesh function seems to be giving me an incorrect Picked Point if my source has a negative Y position. The "source" ray is just fine, but the "alternate" ray seems to be getting a picked point that is on the wrong side of the earth. Any help would be appreciated, I put this in a playground so you can see what I mean. https://www.babylonjs-playground.com/#KNB069
  6. Wow Jerome Sorry I didn't realize you came back and replied, you are awesome
  7. I was able to reproduce it in a PG https://www.babylonjs-playground.com/#0D3P8C Here is a version on stable that doesn't have a problem https://www.babylonjs-playground.com/indexstable#8HS4GZ
  8. I seem to have this same issue on the alpha preview builds. But do not experience the issue on 3.0 stable. return t.prototype.attachControl = function(t, i) { var r, n, o, s = this, a = this.camera.getEngine(), l = 0; this._pointerInput = function(a, h) { var c = a.event; if (a.type === e.PointerEventTypes.POINTERMOVE || -1 !== s.buttons.indexOf(c.button)) if (a.type === e.PointerEventTypes.POINTERDOWN) { try { c.srcElement.setPointerCapture(c.pointerId) } catch (e) {} s._isPanClick = c.button === s.camera._panningMouseButton, I am receiving : TypeError: Cannot read property 'getEngine' of null on the this.camera.getEngine() call It is when I detach the camera on pointerDown, then attach it on pointerUp I am sticking with 3.0 stable for now.
  9. Well thought I figured it out but it doesn't exactly work for all points, sort of spirals on some. https://www.babylonjs-playground.com/#2I0VXX#39
  10. And I finally figured it out. https://www.babylonjs-playground.com/#2I0VXX#34
  11. Hey guys, I have been trying to do this for awhile, and feel like I am almost there. I had been using Bezier Curves but it wasn't quite doing what I needed. I need to draw an arc made with lines between 2 points on the sphere, following the curve of the sphere. I think I am close on this playground but some of my math isn't right in the drawArcFromPoints function Anyone think they can take a look and tell me where I am going wrong? https://www.babylonjs-playground.com/#2I0VXX#28
  12. Here is an idea of what I am going for, this is a crude way to do this, and it almost works. But I am sure there is a better way. If anyone can take a look and help, I would be very grateful. https://www.babylonjs-playground.com/#2I0VXX#8 I am getting the arc based on using a mesh, rotating it with lookAt looking at the center of the earth, then using that angle to calculate control points for the arc. I was using a quadraticBezier first but switched to a Cubic Bezier because I was clipping at different locations. I am still clipping when at different places, have to figure out the right height for the control points I am sure this can all be accomplished with a great circle formula but my trig just isn't up to par for the task.
  13. Good to know, I think I had that backwards in my mind.