Prevent sprite from overlapping with solid objects

0 favourites
  • 10 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I have an issue with a game I am working on. The sprite is overlapping with solid objects when it shouldn't (Well I think it shouldn't). See the image below with the red circle:

    The sprite collision polygon looks like this:

    And the solid object's (tent) collision polygon looks like this:

    So shouldn't it overlap like the one seen in the first pic? How do I prevent this? How do I make it more accurate?

    Thanks!

    EDIT

    I am using

    mouse click + pathfinding[/code:2olzygu7] for navigation. Maybe pathfinding is causing it?
  • check if the collision polygon is the same for each frame of your player

  • check if the collision polygon is the same for each frame of your player

    Hi celstrider I already checked that, the collision polygon is the same for all frames. . . Any other ideas what might be causing this issue?

    BTW, I am using

    mouse click + pathfinding[/code:2byyxkox] for navigation. Maybe it has something to do with that?
  • Try giving your boy the BULLET behavior, set 'bounces off solids' to yes and set speed to 0.

  • Use family solution

  • Try giving your boy the BULLET behavior, set 'bounces off solids' to yes and set speed to 0.

    I tried your suggestion, but it doesn't seem to have any effects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use family solution

    Hey alextro, I downloaded your sample file and it looks good! The sprites are no longer overlapping. But right now I'm using the free version, and the free version doesn't support families (lol) so I can't test it on my project.

    Was hoping to make a prototype with the free version before investing some money on the software. Maybe you have other suggestions that can be implemented with the free version?

    Thanks

  • If overlapping objects are different sprites, you don't have to use family at all. For example first object is a wall and second object is moving matter.

  • Hey alextro, thanks for the suggestions, was able to get a version of your sample without using family, but, it caused some bad effects. So I decided to use a different approach to achieve my goal, used tilemaps instead of sprites, right now its performing better.

    Thanks for the help guys!

  • Hmm unwanted effect... If your workaround make things better then congrats! To be honest I rare using tilemaps but that just me.

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