Apply different restitution rate on physics collider

I’m using physics (Rigidbody and collider) at Cocos creator.

I want to apply different restitution rate when collider hit different type of object.
What will be the smart way to do that?

Thanks.
-Hiroki

you can implement in your component (that has the RigidBody and the PhysicsCollider) onBeginContact or onPreSolve methods and alter the restitution factor using PhysicsContact#setRestitution

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.