Add a shadow effect to an actor
Toby
Member Posts: 478
What's the best way to add a shadow to an actor?
I can include the shadow in the graphic, but the shadow collides with other actors because it's offset quite a bit to create the illusion of depth. Not the best solution.
- I've tried duplicating the actor, coloring it and removing the collision behavious etc
- This approach kinda works but the shadow sometimes falls off and loses the X & Y coords.
I imagine there is a simpler or better way?
I can include the shadow in the graphic, but the shadow collides with other actors because it's offset quite a bit to create the illusion of depth. Not the best solution.
- I've tried duplicating the actor, coloring it and removing the collision behavious etc
- This approach kinda works but the shadow sometimes falls off and loses the X & Y coords.
I imagine there is a simpler or better way?
Comments
Thanks
Report 3 constrained variables from the main to the game:
- the X Position
- the Y Position
- the rotation
Then in the shadow actor (which is placed on a layer below the main actor)
constrain those 3 game variables to the shadow actor.
and simply put a semi transparent shadow around the character on a png.
So the shadow is part of the characters image.
obviosuly this has limtations....
Stuck with a related issue..
What I got to work: Shadow follows a ball which is spawn when mouse is clicked in a certain area.
Problem is, ONLY the first ball has a shadow, any other ball spawn after does NOT...
BUT hold on, actually a shadow IS being spawn for each next ball,
but it's being ADDED to the FIRST BALL??!! (does this make sense to anyone so far??)
So now the first ball has a shadow behind it which is just betting darker + thicker...
I'm lost in what to adjust so a shadow is spawn for each spawn ball...
By the way, I'm simply following the Gamesalad PACHINKO tutorial, but attempting to add
some effects along the way which I'll be using for my first game creation.
Thanks for any help guys!! Loving Gamesalad already after a couple of hours messing around!!