Difference between revisions of "GetMass - ObjectReference"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>Mitchalek
(Added a note for GetMass that object must be controlled by Havok.)
 
Line 23: Line 23:
endIf
endIf
</source>
</source>
== 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_-_ObjectReference|ForceAddRagdollToWorld]] before querying for the object's mass.


== See Also ==
== See Also ==
*[[ObjectReference Script]]
*[[ObjectReference Script]]

Latest revision as of 05:29, 6 June 2012

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]