GetMass - ObjectReference

From Creation Kit
Jump to: navigation, search

Member of: ObjectReference Script

Returns the mass of this object in Havok.

Syntax

float Function GetMass() native

Parameters

None.

Return Value

This object's mass in Havok.

Examples

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

Notes

  • 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