Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


massConfiguration

The body mass configuration comprised of the _mass, _rotationalInertia and _localCenterOfMass. Normally this is computed automatically as each PhysicsShape is added, removed or changed on a body. This will automatically change if the body type changes, for instance, a Static or Kinematic body always have zero mass and rotational inertia. The individual properties of the _massConfiguration and be accessed using _mass, _rotationalInertia and _localCenterOfMass. The PhysicsBody.MassConfiguration will be overwritten when setting this property or if PhysicsBody.ApplyMassFromShapes is called or when adding, removing or changing PhysicsShape with _startMassUpdate enabled.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Property
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public PhysicsBody.MassConfiguration massConfiguration { get; set; }