FlashyGoblin Posted April 6, 2016 Share Posted April 6, 2016 Has anyone seen an example or know how BabylonJS works with reticles when going into VR mode? I'm looking into having a custom reticle or cursor in my scene to use as a targeting crosshair. My thoughts were to use ray casting. I would create a plane in front of the my camera that will be textured with a crosshair image Create a Ray from the middle of a plane out into my scene. Then pick the 3D Object that it hits first. Allow it to work with switching to multiple cameras types for when in VR or not. I know there are ways of doing this. I'm just a bit confused with the implantation. Anyone have any thought? Thanks in advance! Shane Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 7, 2016 Share Posted April 7, 2016 Hi FG! Might want to take a look at http://www.babylonjs-playground.com/#6FFQW#16 (for both reticle and pickingWithRay things) 'PickingRay', yep yep yep. Or 'ray', or 'picking', or 'intersect'... all good playground search-fodder, indeed. if .hit, pickingInfo object has a pile of good data stored on it, and you can pillage that puppy. Search search search... those topics are hot. Our virtual joysticks use an add-on canvas... to paint it's colored virtual-controller rings-onto. It works pretty nice. Umm... you might want to look into a thing called "layer", too. Good luck. Quote Link to comment Share on other sites More sharing options...
FlashyGoblin Posted April 14, 2016 Author Share Posted April 14, 2016 On 4/7/2016 at 9:21 PM, Wingnut said: Hi FG! Might want to take a look at http://www.babylonjs-playground.com/#6FFQW#16 (for both reticle and pickingWithRay things) 'PickingRay', yep yep yep. Or 'ray', or 'picking', or 'intersect'... all good playground search-fodder, indeed. if .hit, pickingInfo object has a pile of good data stored on it, and you can pillage that puppy. Search search search... those topics are hot. Our virtual joysticks use an add-on canvas... to paint it's colored virtual-controller rings-onto. It works pretty nice. Umm... you might want to look into a thing called "layer", too. Good luck. Wingnut, I just realized that I never thanked you for your response. It was very helpful! Thank you! Wingnut and GameMonetize 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.