Difference between revisions of "ApplyHavokImpulse - ObjectReference"

→‎Notes: Zero magnitude works!
imported>DavidJCobb
(→‎Notes: not yet sure if we can use a zero magnitude without it returning early; the Papyrus API doesn't reject it initially, but I don't know if it checks for that when actually applying the force)
imported>DavidJCobb
(→‎Notes: Zero magnitude works!)
 
Line 51: Line 51:
* [[GetPositionX - ObjectReference|GetPosition]] and [[GetAngleX - ObjectReference|GetAngle]] will return the old position. If you need those informations, a workaround is to have a dummy, invisible, object and use MoveToNode to move it to one of your real object's nodes, then get the position of your dummy object. [http://forums.bethsoft.com/topic/1416758-addhavokballandsocketconstraint-questions/page__view__findpost__p__21667888 (source)]
* [[GetPositionX - ObjectReference|GetPosition]] and [[GetAngleX - ObjectReference|GetAngle]] will return the old position. If you need those informations, a workaround is to have a dummy, invisible, object and use MoveToNode to move it to one of your real object's nodes, then get the position of your dummy object. [http://forums.bethsoft.com/topic/1416758-addhavokballandsocketconstraint-questions/page__view__findpost__p__21667888 (source)]


Aside from that, this function will fail and throw a Papyrus warning if the reference has no 3D or if a zero-length force vector is used. Otherwise, the force vector will be normalized before the force is applied.
Aside from that, this function will fail and throw a Papyrus warning if the reference has no 3D or if a zero-length force vector is used. Otherwise, the force vector will be normalized before the force is applied. A zero magnitude is permitted and force will still be applied (i.e. you won't displace the object, but you'll trigger Havok settling and any other side-effects of it being bumped).


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