0
Follow
0
View

2d collider in unity can modify friction for specific side lengths

dgj123488 注册会员
2023-02-28 19:23


In Unity, a Collider component can only have one property of friction, which applies to all surfaces that the Collider touches. Therefore, if you want to apply different friction forces to the bottom and sides, you need to add a separate Collider component for each surface.

If you want to apply different friction forces to different sides of a Collider, consider using Unity's Physics Material. A physical material is a property that can be applied to a Collider to change its physical properties, such as friction coefficient, elasticity, etc.

You can create multiple physical materials, each with different friction coefficients, and apply them to different surfaces or edges on your Collider. For example, you can apply a high friction physical material to the bottom surface and a low friction physical material to the side surface to achieve different friction effects.