richardsmd Posted December 12, 2016 Share Posted December 12, 2016 I'm trying to build a sort of "tunnel explorer" to show points of interest within a tunnel modeled after something in the real world. Within the tunnel are points of interest. Here's a mockup with a tunnel and some points of interest- http://www.babylonjs-playground.com/#1VFLZF#4 By default I expect users to free-roam with a FreeCamera, but I'd also like to be able to "jump to" any given defect by selecting it via UI not shown in the playground. I'm not sure how to do that though... my best theory is this: Add an invisible object in the approximate center-line of the tunnel (CL) Upon selecting a point of interest to jump to, locate the point on CL closest to the centeroid (mesh.getAbsolutePosition()) of the point of interest and set the camera's position to that point Rotate the camera to look at the point of interest Can anyone help me implement step 2 (jumpNearestOnCenterline in playground)? Note that my actual tunnel not straight and constructed via a point cloud, so there is no good/simple way to determine the center of the tunnel that I'm aware of I've never worked with cameras or automatic camera positioning systems before so my solution is inspired by GIS. If you have a more straight-forward idea I'm all ears. Thank you for your time, Mike Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.