distraub

Members
  • Content count

    17
  • Joined

  • Last visited

About distraub

  • Rank
    Member

Recent Profile Visitors

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

  1. distraub

    Having an issue with Ray.intersectsMesh

    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.
  2. 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
  3. Wow Jerome Sorry I didn't realize you came back and replied, you are awesome
  4. distraub

    camera.detachControl

    Awesome! you rock!
  5. distraub

    camera.detachControl

    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
  6. distraub

    camera.detachControl

    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.
  7. 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
  8. And I finally figured it out. https://www.babylonjs-playground.com/#2I0VXX#34
  9. 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
  10. 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.
  11. Good to know, I think I had that backwards in my mind.
  12. is createInstance less expensive than clone?
  13. My next question would be how can I easily get the intersection point between my line and the bounding sphere? I have a wireframe mesh where I would like my bounding sphere in this playground. I would like to pick up the Vector 3 of where the line touches the face of the bounding sphere first. https://www.babylonjs-playground.com/#1NZLA9#7
  14. hi @Wingnut thanks for the reply! What I am looking for isn't really a weapon, or a spacecraft, more of a broadcast point to a spot on the planet, visually showing the communication. So ideally it would be an arc to the planet first, since it just looks cool, but then it would catch and orbit the planet and stop on a particular lat/long. I was thinking of using a bounding sphere around the planet, catch the intersection point on the sphere from the first arc, then finish it by following the arc of the sphere with a new curve. I am going to give that a try today, but am very new to Babylon, so am not quite sure of all the details and the math to make it happen.
  15. Thank you, I really wasn't only looking to put the line in a different rendering group . I would love it to contour the planet, but am not sure the best way to go about that. I will have multiple points from space hitting multiple spots on the planet. and I wanted to make sure you could see them all individually. Initially I thought I could bring them all to a point and then have them wrap around the planet to hit their destination, but then you wouldn't be able to tell which object was connecting to the planet.