How do I Create a shadow and constrain it to the floor?

0 favourites
  • 3 posts
From the Asset Store
************ 2D top down floor spikes **************
  • Hi Guys,

    I kinda have have two questions, and I've searched the forums, and half the links are broken and old,

    and I don't find much on YouTube.

    Question1: How do I make a player shadow, that is constrained to the ground when a player jumps, I thought of adding it to the sprite of the main player, but it wouldn't work if my character was doing a double jump, and I'm going to need big sprites for the player every time he jumps (which is not ideal). Thought of making a gradient oval and scale it as well as change opacity when player jumps.

    Question2: I have a life pickup, which is on a separate layer in game, if my player picks up the Life Pick up, I want the life pickup to fly from where my player is and move itself to the HUD , top left of the screen?

    I'm sure it possible, I just need to know how to go about doing it..?

    Any help would be greatly appreciated !

    Thank you!

  • 1. You can make a separate sprite for shadow and set it to (character.x, ground.y) on every tick.

    But I don't know what to do if your character is jumping over a box or a gap in the ground.. Maybe use a blend mode, to make the shadow only visible when it's overlapping the floor.

    2. You can do this with Bullet, but I would use MoveTo behavior:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, Thanks for your help so quick!

    I'll check it out later today and let you know how it goes!

    Thanks!

    Dylan

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