Dad72 Posted March 17, 2017 Share Posted March 17, 2017 Hello, @Deltakosh BABYLON.RayHelper is not accessible in the playground: http://www.babylonjs-playground.com/#KNE0O#15 @getzel the demos playground in the tutorial no longer works (with ray.show() deprecated: see: https://github.com/BabylonJS/Babylon.js/blob/master/dist/preview release/what's new.md#breaking-changes) error : http://doc.babylonjs.com/tutorials/raycasts getzel 1 Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 17, 2017 Share Posted March 17, 2017 Hi, ray.show has been removed in last bjs version - If you use 2.5 it works. If you create a new RayHelp it works. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 17, 2017 Author Share Posted March 17, 2017 yes I know. But the tutorials are outdated in this case and RayHelp is not accessible in the playground. But I said that I know is ray.show depreciate : Quote (with ray.show() deprecated: Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 17, 2017 Share Posted March 17, 2017 So why you say this ? 1 hour ago, Dad72 said: BABYLON.RayHelper is not accessible in the playground Isn't only the method 'ray.show' that is not available ? The tutorial outdated should be indeed updated Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 17, 2017 Author Share Posted March 17, 2017 Not RayHelp is not accessible. if the fact that I did BABYLON.r ray propose and not RayHelp Quote Link to comment Share on other sites More sharing options...
adam Posted March 17, 2017 Share Posted March 17, 2017 Here is a good RayHelper example: http://www.babylonjs-playground.com/#ZHDBJ#37 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 17, 2017 Author Share Posted March 17, 2017 Ah, I do not use it well. But that's 3 more lines for use show (). I preferred as it was before, less complicated. Why the change more complex. before, it was more direct. Now is really complicated. I do not understand this change, which does not simplify. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 17, 2017 Share Posted March 17, 2017 The problem was more about memory. ray.show generated too much code and was not great for that. Now that we have an object to support it we can keep the ray small and efficient I'll update the tutorial. Thanks for the hint. And let's be honest, it is not "Really complicated" we move from: ray.show(scene, new BABYLON.Color3(1, 1, 0.1)); to: var rayHelper = new BABYLON.RayHelper(ray); rayHelper.show(scene); I think it is a good trade off considering that now we can easily add more features to the helper without touching the pure math function for rays! adam 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 17, 2017 Share Posted March 17, 2017 And now just one line because I agree, updates should not add more code: BABYLON.RayHelper.CreateAndShow(ray, scene, new BABYLON.Color3(1, 1, 0.1)); Dad72 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 17, 2017 Share Posted March 17, 2017 I also updated the doc to add a word on the RayHelper: https://github.com/BabylonJS/Documentation/blob/master/content/tutorials/01_Play_Pen/Raycasts.md Dad72 and getzel 2 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 17, 2017 Author Share Posted March 17, 2017 That is super : BABYLON.RayHelper.CreateAndShow In made it was hard to understand how to use it, that's why I said it was more complicated. I do not use the right ways to do it. Thank you for this function that I understand better and is easier. GameMonetize 1 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.