Shadow Caster - check if object is under shadow

For questions about using Classic.

Post » Tue Mar 02, 2010 2:21 pm

I found out that Shadow caster doesn't have a built-in event trigger that checks if something is under the shadow. I was thinking of the best way to do something like it, the most efficient and flexible way.
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Wed Mar 03, 2010 6:27 pm

Does the shadow ever move or change?
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Thu Mar 04, 2010 12:36 am

Yes.. It has a dynamic light source.
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Thu Mar 04, 2010 2:12 am

Unless you know how all the math for the Shadow Caster works, I'd say no. Of course, if someone else knows the math or how it works or can create a plugin/add a feature to the plugin for it, then you could do it. Right now, Shadow Caster doesn't have any Conditions, so I don't think there's anything you can do besides hope one of the expert Construct users comes up with some special method.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Thu Mar 04, 2010 3:07 am

you dont need it to have a condition. you can probably fake it with the line of sight behaviour, or ray tracing to an object. the thing is tho, its the opposite of having line of sight being in a shadow, so you know that the object is in a shadow when the lightsource, DOESNT have line of sight.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Mar 04, 2010 8:36 am

Quazi's idea appears to be best, with LoS toggled to give the opposite (what it can't see).
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Thu Mar 04, 2010 10:28 am

Now why haven't I thought of that.. tahnks!
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Thu Mar 04, 2010 3:25 pm

Well, that really depends on what you are doing. Shadows have varying length depending on where the light is. If you want the shadow length to vary, LoS wouldn't work for that.

Edit: There's also complications if the light is over the shadow casting object, but I have no idea what you are using this for so that makes advice more difficult. We don't even know how dynamic/accurate/flexible you need this to be.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest