GetMass - ObjectReference

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

Returns the mass of this object in Havok.

Syntax[edit | edit source]

float Function GetMass() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

This object's mass in Havok.

Examples[edit | edit source]

; Is this thing very heavy?
if (AnvilProperty.GetMass() > 2000)
  Debug.Trace("Wow, the anvil is heavy!")
endIf

Notes[edit | edit source]

  • The object has to be controlled by Havok ("ragdolling") or this function will always return 0. Use PushActorAway and wait few miliseconds or ForceAddRagdollToWorld before querying for the object's mass.

See Also[edit | edit source]