Kreeba Posted July 28, 2017 Share Posted July 28, 2017 I have some line meshes that are just 2 vectors, one at the start and the other for the end. These lines then update every pre-render as they are between two objects that move. I have noticed that when the end vector position is out of view of the camera then the line doesn't show. Is this normal behaviour? How can I correct it so that the lines always render no matter if the end point is out of view or not? Thanks Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 29, 2017 Share Posted July 29, 2017 Hi K! That sounds... non-normal. hmm. Can you make a playground that shows us the problem? Here's a playground that has lines connecting moving mesh. Maybe it will help fix something. https://www.babylonjs-playground.com/#1EBCJY#3 It seems to keep drawing lines okay, even when control-dragging the camera until one of the mesh is out-of-view. Maybe you can borrow a little code from there. Good luck, report back. thx. Quote Link to comment Share on other sites More sharing options...
adam Posted July 29, 2017 Share Posted July 29, 2017 The line won't be rendered if the bounding box of the line goes off camera. For example: https://www.babylonjs-playground.com/#1EBCJY#12 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted July 29, 2017 Share Posted July 29, 2017 https://www.babylonjs-playground.com/#1EBCJY#13 line 58 : refreshBoundingInfo() mmmh.. something I could embed in the call to the morph update Wingnut 1 Quote Link to comment Share on other sites More sharing options...
adam Posted July 29, 2017 Share Posted July 29, 2017 or set linesMesh.alwaysSelectAsActiveMesh = true; https://www.babylonjs-playground.com/#1EBCJY#14 or set a larger bounding box from the start. Quote Link to comment Share on other sites More sharing options...
Kreeba Posted July 30, 2017 Author Share Posted July 30, 2017 Thanks that has got it. Marked as solved 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.