0 Favourites

How do I fix the shadow caster hide some sprites?

  • The problem with shadow caster is that you need to put the light under the sprite to not hide but then when you use dinamic lights they not hide the sprites that are in the shadow of other object.

    Here an example of the prototype i'm working :

    That box in the bottom needs to be hiden, how i fix that? Is there any way to set that if a shadow of other object overlaps other hide this one or apear over them or something?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You can use Line Of Sight behaviour to hide things the player can't see by setting them to invisible.

    ~Sol

  • No works because the objects to hide are the same ones that blocks the line of sight so never is visible , i don't know if i'm explaining well.

    For line of sight you set wich objects acts as "block" and the box is a sprite that have to block and one that have to be hidden.

    Also even if there is someway to fix that no matters because, what happens when the shadows have to hide some part of the sprite? With line of sight the sprite is visible or not, in the example will be ok, but if the shadows only gets half of the box will appear entirely so still not will be 100% correct. :S .

  • Ok, yeah I think I know what you mean now.

    I don't think there's an easy way to do what you want... Shadowcaster is a little bit limited I guess in certain ways, and there's been a lot of requests over time to add improvements to it. I worked on making my own shadow system some time ago, but it wasn't very efficient and caused a lot of CPU usage so I gave up in the end.

    I'm not sure if there's a good way to do this - but I'm sure someone here will prove me wrong, lol!

    ~Sol

  • This can be solved in a easy way if shadows works like:

    Always above sprites but the cast starting out the sprite instead of inside.

    The problem now is the shadow caster make the collision poligon with shadow so you have to put the light under the sprites and appears problem like this.

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