How would I make something like this work in GDevelop?
Use a raycast from player to each enemy/other player, and check whether theyâre obscured.
Set âzâ value of your shadow sprite higher than the object.
Eh? When using a light object, the shadow is not a sprite.
What shadow sprite? I just have a light that follows my player around.
How would I go about doing that?
In my game the shadows cover the enemy players, but doesnât actually hide them like Iâm trying to do:
Oh yeah sorry, I got the question wrong. Btw I donât have light objects in my gdevelop, how do I add them?
To add a light click âadd a new objectâ then select âlightâ
For an alternate option:
- Install the Sprite Mask extension.
- Edit it to change the object parameter from âSpriteâ to âAny Objectâ
- Add all of the objects you want hideable to an object group, like âCanBeHiddenâ or whatever you prefer.
- Mask those objects with your light object. They will only be visible when they are lit up.
4 Likes
Nevemind, I uninstalled and reinstalled Gdevelop, I have my light object now
1 Like