Jump to content

Visual light area


CodingMadeEasy
 Share

Recommended Posts

I would like to have the below effect

7723.image_5F00_thumb_5F00_11F5CA14.png

 

The problem I'm having is that the spotlight doesn't provide me with the total length of the light, so there's no way for me to calculate the measurements for the cone. Can someone please lead me in the right direction on how to get the desired effect?
 

Thanks in advance.

Link to comment
Share on other sites

Thanks for the reply :). I have used light.range but I'm not getting the expected behaviour. Maybe I'm misunderstanding how it's to be used. 

When I set light.range to a certain value, I expect that the light will only travel up to that distance in world coordinates. However, when trying to visualize the cone, the light seems to traverse farther than expected. Here's a sample of what I'm talking about: http://www.babylonjs-playground.com/#VHFLM#4

Note that my math may be a little off, but I would expect the height of the cone to at least reach the sphere which it's not. 


 

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