Trouble with physics/collisions

0 favourites
  • 4 posts
  • Hello again,

    I am using the 8 direction movement for the player (top-down) and I disabled the world gravity, so that is not a problem. However, what I am having trouble with is collisions.

    Right now I have 3 physics objects: the player (set to immovable:no, use collision polygons, prevent rotation: yes), the monster (same settings essentially except the prevent rotation), and walls which are set to immovable object.

    I double checked and made sure all of these are on the same layer.

    The problem I am having is this: When the player collides with a wall, well, there is no collision. The player just moves right through it without any effort (the player appears to go "under" the graphic). The monsters do the same exact thing. The player and the monsters also don't collide and instead just pass through each other (but all events associated with "on player touch" or "on monster touch" still work just fine).

    Prior to this, I had all 3 objects as solids with no physics. The player could not go through the wall, but monsters still could clip through it.

    Any suggestions are greatly appreciated. Thank you!

  • This is because you are using the 8-direction behavior in conjunction with physics. You cannot do this! You will have to manually apply forces based off key combinations.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's strange because I also have randomly spawning barrels that use the physics as well. I can push them just fine with the player, and the monsters run into them and they move just fine, and the barrels collide with the wall just fine. It's just the player and monsters not colliding with the wall that's the problem.

  • Doesn't seem to be an edit button D: (edit* oops, I missed it)

    Anyway, I uploaded the capx to dropbox, if anyone wants to take a look and maybe tell me how stupid I am for missing something? I'd appreciate it. Thanks!

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