How do I mouseover over whole sprite with reduced polygons?

0 favourites
  • 5 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Hi,

    i am currently trying to create a graphic adventure and for the player character to be able to walk behind objects i had to reduce the area of collision polygons to at least the lower 25%.

    But now it's also necessary to move the mouse cursor to these 25% to display the object information (for example "Look at chair"), which could confuse most players.

    My question is: How can i use the whole sprite for a mouseover without increasing the collision area?

    Thanks in advance for the help!

  • Make an invisible sprite at whatever size that you need and pin the player character to it.

  • Thanks, but i mean not the player but every object in the game the player needs to be able to get behind AND interact with.

    Like the chair, the collision polygons only make up the lower 25% of that sprite, so the info mouseover (which just shows "Chair", "Table", etc.) doesn't work with the whole sprite.

    So i have to make an invisible sprite for every of those objects?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's what I usually do. I use invisible 2x2 tiled backgrounds scaled up though.

  • You could do it the other way around just to make it easier. Make normal collision polygons for all objects - so you can interact with them normally, like hover mouse over them, etc.

    But for proper collisions with players you could use separate object. like Burvey suggested. Make a 2x2 sprite or tiled background and simply copy it over and placed on the layout making kind of a "level collision map".

    Also if you want to make player go behind or in front of the objects you can do that with just a Origin or Image point of the sprite:

    Player.Y > Sprite.Y = player is in front

    Player.Y < Sprite.Y = player is behind

    ....but it all depends on what kind of style your adventure game have.

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