Andy R

Physics P2 Collision equation

Recommended Posts

Hi,

i've 2 characters physics p2 enabled, they both can collide with each other, they are also static=False.Which mean that when one run toward another, the second get back and get some velocity.

Which properties i've to set to get more control on this effect ? I tried editing masse/inertia but got had not good results. Any tips ?

 

I'm also looking for an equation that show how the effect works depending on theses parameters.

 

Thx

Share this post


Link to post
Share on other sites

Static objects should not collide as they are  ... static.  Static are two houses on street - it does not move.
For moving objects in game physics (not only P2) you have two choices:
 - kinematic body,
 - dynamic body.

Kinematic body is good for things like moving platforms - it moves, but when player jumps on it it does not react and still makes its work. Dynamic bodies are what you need when you want action-reaction behaviour. Now, you can set its mass and other properties to tune your game.

 Regarding equation, this is good source: http://chrishecker.com/Rigid_body_dynamics and equation you are looking for is in part 3: http://chrishecker.com/images/e/e7/Gdmphys3.pdf

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.