As per the forum discussion:
http://www.box2d.org/forum/viewtopic.php?t=5038
It would be good to be able to inject or override the default behavior for
friction and/or restitution. Ideally this could be implemented as per the
b2ContactListener such that a friction and/or restitution listener could be
registered to intercept contacts and provide an opportunity to alter friction
based on custom business rules.
For example:
One may want to nominate differing friction values for edges on a polygon such
that one edge has a different friction than the other. This could be achieved
by inspecting the normals etc of a contact and dynamically altering the
friction to suit. Similarly changing base friction values for contacts of
differing body types could be achieved via the same mechanism.
Thanks,
Jason.
Original issue reported on code.google.com by jason.po...@gmail.com on 17 Jul 2010 at 9:37
Original issue reported on code.google.com by
jason.po...@gmail.com
on 17 Jul 2010 at 9:37