Problem with collision interacting with bullets #PushAway

0 favourites
  • 3 posts
  • Hello Construct Community!

    I have the following issues with my current game and am thankful for any advice. My project files are commented and structured, hoping to make things as easy as possible for "strangers" who are new to the files.

    I'm really hoping to find a brave soul who wants to help <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">


    • The game is a top-down endless runner (having randomly generated objects - bullets - for an infinite level). If the user moves off the screen = game over
    • To get a certain feeling I rotate the whole level (multiple layers) while the player remains still
    • Another important mechanic: How the Player and its shadow interact: Leaving the ground will "decrease the players height" (too long off ground = game over). Because I wanted the player move to its shadow and not the other way around, the user is actually steering (custom movement) the shadow and the player is positioning according to it.


    • I want obstacles (that spawn like the "ground") to act as solids, so the player can't fly through them + being pushed away by them when not moving away.
    • Since the obstacles are bullets and the shadow uses custom movement, I tried to work with giving the bullet obstacles a solid behaviour and the player object a platform behaviour.


    Test-Project File: ... g.c3p?dl=1

    (That the "player" was not pushed out of the screen but to the side was something I couldn't fix. But this worked at least close to what I wanted)

    • Applying it to my project (When you look at the file, the most important groups for this problem are "Player Controller", "Obstacle System" and maybe "Obstacles" in the "Spawning System Group")


    Project-File: ... s.c3p?dl=1

    • First I needed to reverse the "position player to shadow" while the obstacle colliding is in progress, so the "player platform behavior" + the "obstacle solid behaviour" could take effect.
    • Then I had to stop the shadow from "keep on going", so I positioned it to the player, stopped the custom movement and set the "player height the almost 0" so the player almost "crashes" when hitting an obstacle
    • To go back to the normal "not colliding mode" I use a "trigger once while true" so the whole collision process "repeats it self".


    • Hitting the obstacles from the side works like it should (even though it just "stops" the player and is not any close to being "realistic")
    • Because the obstacles are moving (bullet behaviour) the collision while being "behind the obstacles" sadly has a bad "stepping effect" and does (like in the first test) not push the player of the screen.

    Extra problem:

    • The whole collision seems to have no effect when getting close to the screens borders/ off the original layout size


    • What I want is to have a collision system that makes it possible to stop the player and push him of the screen
    • I want to fix the issue that the whole collision doesn't work close to the screens borders


    • Having those rotating layers adds a bit complexity since I carefully need to position objects on different layers via global variables and the CanvasToLayer-LayerToCanvas Method
    • The controls have quiet a learning curve, so you probably need to give it one or two shots until you get the hang of it. But if you better want me to upload videos of the "bugs" I can do so.
    • And ignore the "yellow keys" on the controls tutorial (they are deactivated at the moment)
    • I also played around with the Physics behaviour to see if I get results with it, but ney...

    I'm so thankful for any feedback, help or advice!

    Because having rotating layers, bullet objects, a player object that is controlled by its shadow and has custom movement AND the wish to make obstacles act as solids to the player is sort of really hard <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    So thanks to anybody who wants to give this challenge a try!! I hope a solution will help whoever wants bullets to work as solids to the player!

    All the best,


  • Still haven't found any solution. Anybody having the same problem? Any clue on solving this collision problem with bullet + solid interaction would help a lot.

    All the best,


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)