x


Raycasting without a direction

Is there a way to raycast without a direction to see what colliders are directly around an object? I'm trying to create a dynamic lighting script, so I need to be able to check which objects the light can "see".

My other idea was to use a SphereCast with collision so that I could check which objects were adjacent to the light, and that the light could see. Are either of these options possible?

Thanks, Chad.

more ▼

asked Jan 21 '11 at 02:41 AM

Chad 2 gravatar image

Chad 2
70 4 5 15

I'd be interested in exactly what you are trying to do, maybe there's a way to script things (or shaders) to do what you need.

Jan 21 '11 at 05:32 AM DaveA

Well, what I'm trying to do is contact the cubes around a GameObject acting as a lightsource and set their main color to be a higher or lower value depending on the distance. Is there a way to do that that I'm just missing? Thanks,

Jan 21 '11 at 05:34 PM Chad 2
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
more ▼

answered Jan 21 '11 at 03:12 AM

Jessy gravatar image

Jessy
15.6k 72 95 196

Cool, you linked to one of my questions. :)

Jan 21 '11 at 07:37 PM OrangeLightning
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x179
x1

asked: Jan 21 '11 at 02:41 AM

Seen: 821 times

Last Updated: Jan 21 '11 at 02:41 AM