How do I predict the physics?

0 favourites
  • 4 posts
From the Asset Store
Physics Tank
$2 USD
80% off
Everything is made via physics, Very simple code: 6 events only (3 for tank creation, 2 for controls and 1 for camera)
  • Hi Guys,

    Is there any way possible to predict the happening physics. Like, If i shoot a ball from the left side to a basket in the right side, it may or may not hit. So, I want to predict if it is going to hit the basket before it hits, so that i can create an animation to the basket. Or if it is going to miss, I want to create some missing animation.

    Now I know that a easy way is to create a invisible sprite around the basket and when the ball collides the invisible sprite, start animation. But physics does not happens in the same speed, so i need to check if it can be done some other way??

    Is this possible??

  • What do you mean with "physics don't happen in the same speed"?

    In any case, another way of doing it would be shooting an invisible ball with the same physics properties as your actual ball a little before, in the same conditions (speed, angle, etc), and check if that one hits.

    The other way would be doing the actual calculations yourself, but that defeats the purpose of having a physics engine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What do you mean with "physics don't happen in the same speed"?

    I may hit the ball in different speed. Sometimes it hits quickly and some times it hit very slowly based on the angle.

  • Nevermind I achieved with the same procedure but with some extra events.... Thanks anyways

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