How do I detect when a physics tower is falling ?

Not favoritedFavorited Favorited 0 favourites
  • 2 posts
From the Asset Store
Stacking tower is a game to try to make the tower higher
  • I tried using Angular Velocity, but it doesn't work well because there are many objects.

    tower made of multiple physics objects

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess if the y velocity of an object is positive then it’s falling. Since it’s a stack and you don’t want to consider the one you’re placing on top you could pick all the falling apples and if there are more than one, you could consider the stack falling.

    A first iteration of the idea could be something like this:

    Pick by comparison: apple: apple.physics.velocityY>0
    Conpare: apple.pickedCount>1
    — set falling to true

    If comparing by 0 gives too many false positives you could use a higher number.

    There may be ways to make it more rigorous. Maybe if you looked at the total speed of each apple and if more than one were increasing in speed then you may be able to detect the stack tipping before it actually starts falling.

    Another idea is to just count the number of apples on the ground. However, that would only detect that the stack already fell.

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