Shadow Caster - check if object is under shadow

This forum is currently in read-only mode.
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • 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.

  • Does the shadow ever move or change?

  • Yes.. It has a dynamic light source.

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

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

  • Quazi's idea appears to be best, with LoS toggled to give the opposite (what it can't see).

  • Now why haven't I thought of that.. tahnks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)