OverviewFelgo 2 Support (Qt 5) › How to detect Kinematic components going out of the scene?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #8639


    My game is a “platformer”, so I have platforms regularly travelling “out of” my scene.

    I’m not sure the best way to detect this situation.   I have “walls”, like the Stack the Box example, which keep players and dynamic objects in the scene, but since platforms  are Static (because they can’t be affected by things hitting them, and they are not supposed to collide with each other), the platforms just float right through the walls undetected.

    At the moment I have a timer scanning the list of platforms for ones that are out of play and deleting them (they are pooled).   Having a timer and scanning the whole list of platforms seems unduly expensive: I’m not at all keen on it.

    Is there a better way?

    • This topic was modified 4 years, 11 months ago by  GreenAsJade.
    • This topic was modified 4 years, 11 months ago by  GreenAsJade.

    Felgo Team


    what we are doing in our Chicken Outbreak platformer example is using Dynamic bodies with collisionTestingModeOnly enabled. This makes them sensors that are not affected by any physics, and since they are still Dynamic they detect collisions with Static bodies. Have a look at the BorderRegion entities of the Chicken Outbreak example. You can add those sensors just far enough outside of the screen to make your platform fully leave it and then destroy them upon contact.




    Thanks, perfect!






    No, wait, that’s no good 🙂

    The platforms can’t be sensors only: the player has to stand on them, and falling things have to bounce off them…




    Felgo Team

    No, the platforms stay static, we only add Dynamic sensors outside the screen to detect collisions with those static bodies leaving the screen.



    Hah – thanks!  Silly me!


Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support