Sign in to follow this  
Dad72

RayHelper.show

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

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:

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.