Creating a Light Cast / Comparison

Get help using Construct 2

Post » Sun Nov 04, 2012 9:00 am

Hi Guys,

I'm trying to figure out how I should build a light cast. As per the image, the character is holding say, a torch which highlights areas from it's central point (raycasting basically). I then need to be able to click on a lit area for an event.

Diagram Example: http://puu.sh/1mfsa

Do I basically need to fire out a whole spread of bullets? Any suggestions are helpful!

Hope you're having a good one!

ST~Sonictail2012-11-04 09:02:31
B
5
S
1
G
1
Posts: 9
Reputation: 1,425

Post » Sun Nov 04, 2012 12:02 pm

@Rojohound made a capx showing how to do dynamic shadows (it needs the canvas-plugin)

http://dl.dropbox.com/u/5426011/examples14/shadow_cast.capx

Or you could use the solution by @Rory:

Make a light source object and a black square object.
Set the black square object's height and opacity depending on the distance from the light source.
Pin the black square object from a point at the bottom of the black square object to the shadow casting object and set its angle to the opposite direction from the light source using Angle().
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Sun Nov 04, 2012 12:30 pm

Yep, the canvas plugin is your best bet for this!
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400


Return to How do I....?

Who is online

Users browsing this forum: Skebab, Yahoo [Bot] and 12 guests