Why are my collisions doing this?

0 favourites
  • 7 posts
  • So I decided to start digging into the actual game-building part of a project I have been working on for a long time. After reading a bunch of tutorials and watching a bunch of videos, I thought I would be able to jump right in and get some decent work done. Turns out that's not the case and I'm feeling pretty overwhelmed. Most urgent problem is that my collisions seem to be under where the actual pink sprite appears on the screen and my camera is inoperable. Is this a common or easily fixed issue?

    youtu.be/rIJLgR79jtI

  • Looks like the collision box on the player or the pink sprites, open them in image editor and check the collision box it is one of the icons on the left tool bar.

  • My "Base" for the player's collision and the pink collisions both have collision polygons that occupy the entirety of the sprite. I thought the collision of the "Mask" (the red knight) might be the issue but he has no collisions and exists purely to represent the position and motion of the player, as of now. Maybe it's something to do with how I stretched one of the collisions, but I've tried messing with it and the results seem to be the same. I'm thinking it's got to be something to do with the collision polygons that I don't know about.

  • Maybe the base is in the correct place but the knight is pinned below in the wrong position? Make the base visible so you can see where it is in game. what logic did you use to fix the knight to the player movement sprite?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Turns out that was the problem. Thank you! My logic for pinning the two together is just "System -> Every Tick -> Player (the collision-less animations) -> Set Position to Base.X, Base.Y"

    So I guess off the top of my head there are two ways to fix it. I'm assuming one is changing the last step to "Base.X-??, Base.Y-??" and just jimmy it until it looks right. The second would be to ditch the mask-base separation and give the player sprite all the collisions. However, something I plan to attempt to implement pretty soon is combat and the player's disjointed hitboxes. Since he's got a flag to attack, his flag swing should not occupy the same area as his body, so I was told I would need the mask-base separation to make two separate collision polygons, one for terrain collision/hurtboxes and the other for hitboxes. Is this true or do you know if there is an easier way to create a hitboxes-hurtboxes separation that would allow me to ditch the mask-base separation, provided ditching the mask-base is the best option?

  • The fix is to sort out the image point, it looks like it isnt in the centre of the base object? You can reset it in the image editor. Or its possible that the image point is off on the other object, the knight. Make sure the image point 0 are both in the centre of the objects and it should work.

  • I tried to hold off on changing the knight's image point because he moves around so much, so I just messed with the center of the base and now it looks like the knight is standing, running, jumping, and falling normally on solid ground. Thanks a million!

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