文档

Unity Engine


User Manual

Script Reference

Unity Engine


bounciness

Coefficient of restitution.
阅读时间1 分钟最后更新于 22 天前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public float bounciness { get; set; }

Remarks

Restitution (bounciness) is used to control how "elastic" a collision response is. A value of zero indicates no bounce at all while a value of one indicates perfect elasticity (approximately).
Note: Values higher than one are allowed but will add "energy" to the collision response. Use caution, as this can cause a Rigidbody2D to move quickly without limit, leading to simulation problems.