GetMass - ObjectReference

Revision as of 06: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)

Member of: ObjectReference Script

Returns the mass of this object in Havok.

SyntaxEdit

float Function GetMass() native

ParametersEdit

None.

Return ValueEdit

This object's mass in Havok.

ExamplesEdit

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

NotesEdit

  • 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 AlsoEdit