localCenterOfMass
The center of mass position of the body in local space. This can be accessed as a union of PhysicsBody.mass, PhysicsBody.rotationalInertia and PhysicsBody.localCenterOfMass using PhysicsBody.massConfiguration. When this value is overridden with PhysicsBody.massOverride, setting it authors the override value, which persists across mass recalculations.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Property
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public Vector2 localCenterOfMass { get; set; }