GetMass - ObjectReference

From the CreationKit Wiki
Revision as of 05:29, 6 June 2012 by imported>Mitchalek (Added a note for GetMass that object must be controlled by Havok.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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]