0 Favourites

How do I keep my apples in the basket?

  • link to capx:

    I'm not sure if there's a way to set the physics, or what I want can't be done.

    The "basket" moves left and right (you have to touch the bottom to drag).

    Basically, I want to catch the apples, which works. But when the user quickly moves the "basket" back and forth, the apples come out of the sides.

    Is there a way to keep them in? If not, I guess I'll have to destroy them, but it was cool to see them accumulate.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Official tutorial says "Avoid crushing/trapping objects with Solids"

    I don't have much experience with physics engine, so maybe there is a better solution, but I came up with this: Clone basket!

    Basically when an apple collides with the inside of the basket, I create a clone apple in a clone basket which doesn't move. And then I adjust position of the original apple based on its clone's position on every tick.

    There still may be issues when there are too many apples in the basket or if you move mouse vigorously enough. Maybe you should somehow limit the speed of your basket.

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