deez Posted September 8, 2017 Share Posted September 8, 2017 Hi, I'm new to all this but I have exhausted my search results so I though I would reach out to the community. I'm leaning toward babylon.js for a project but I am looking specifically for support for two distinct features. 1. ability to have camera fly to another point in a scene 2. use occluded annotations See example: http://xeogl.org/examples/#presentation_annotations_tronTank Does babylon have any build in functionality to support this? Is there a similar demo available in the playground? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
brianzinn Posted September 9, 2017 Share Posted September 9, 2017 #1 If you change camera position and target - should work as you expect. #2. if that is the label - there are things like trackable labels (http://doc.babylonjs.com/overviews/gui). If you mean occlusion queries that is in 3.1 (http://doc.babylonjs.com/overviews/occlusionquery) Quote Link to comment Share on other sites More sharing options...
deez Posted September 10, 2017 Author Share Posted September 10, 2017 Thanks for the response. 1. I was looking for a way to pan the camera to a new position. I found a technique using animation. 2. Trackable labels. Got it. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted September 10, 2017 Share Posted September 10, 2017 Cool you got #2. For #1 you can do animation and that's a pretty good way - just set start and end position and # frames with animation target as camera (animations have easing functions, which look nice, too). You can also move yourself in one go by setting position or gradually by Lerp (http://doc.babylonjs.com/classes/3.0/vector3#static-lerp-start-end-amount-rarr-vector3-classes-3-0-vector3-) runRenderLoop(() => { var lerp = BABYLON.Vector3.Lerp(startPosition, endPosition, fracDistance); camera.position = lerp } Adam put up a cool PG using SlerpToRef, but it's for rotation and you just want position, but at least you can play with the fraction and see how it affects movements:http://playground.babylonjs.com/#UMQ4UR#2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.