Realistic physics between two moving objects

0 favourites
  • 3 posts
From the Asset Store
2D realistic cloud pack has 11 different clouds included.
  • Right now, when the player collides with the enemy, the enemy doesn't move, nor does the player "bounce" off of them.

    I want to simulate realistic physics where if the player hits an enemy, the two 'bounce' off each other.

    Does anyone know how to do this?

    CollisionNotWorking.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I removed the player setting to stop custom movement so now the player seems to collide and react well.

    The enemy still does not react to the collision, instead staying there like a brick during the collision.

    UPDATE: I think I solved the issue. The AI pathfinding was causing it to continue moving along the found path during the collision, which overrides the physics behavior that would cause it to bounce. Stopping the enemy's movement along the AI path during collision seems to allow the physics behavior simulate a collision.

  • Here's an updated version of the project.

    The player is now correctly 'bouncing' off of the enemy upon collision, but the enemy remains in place. I'm not sure how to make the enemy 'bounce' (completing Newton's Law). Any help in this area would be appreciated.

    Here's a screenshot of the events where the collision is handled.

    <img src="http://i.imgur.com/AxpmsLU.png" border="0">

    CollisionNotWorking2.capx

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