Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

P2 Physics multiple contact materials


tips4design
 Share

Recommended Posts

I create a game where multiple objects are instantiate, each one with it's own properties (restitution, friction, etc...).

 

I want all those objects to collide between them, so I thought I have to use contact material. This means that I will have a material for each object, but this also seems to mean that I need N(N+1)/2 contact materials (one for each pair of two materials). Is this a performance problem if I have like 10 materials or more? (100 contactMaterials)

 

Ideally I would like to be able to create something like: this object has 0.3 restitution, this one has 0.6 restitution, etc... and expect for everything to work ok (without creating contact materials). Is this possible? Is there a better way to solve this multiple contact materials problem?

 

Thanks!

Cristy

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...