Jump to content

RayHelper.show


Dad72
 Share

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

 

Link to comment
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.

Link to comment
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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...