文档

Unity Engine

Unity Engine

SetDensity(float)

Sets the mass based on the attached colliders assuming a constant density.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public void SetDensity(float density)

Parameters

density

Remarks

This is useful to set the mass to a value which scales with the size of the colliders.