Difference between revisions of "ApplyHavokImpulse - ObjectReference"
Jump to navigation
Jump to search
→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>Perdev |
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) |
||
Line 50: | Line 50: | ||
* If your object's original position is now a few cells away from the player, it will be unloaded by the game even if its graphics and collision box are close to the player. A workaround is to periodically translate your object to "self" through [[TranslateToRef - ObjectReference|TranslateToRef]]. This will not translate the mesh and collision geometry. However, if the translation completes, the position will be updated and you will see the object's mesh blink. To address this, you need to use [[OnTranslationAlmostComplete - ObjectReference|OnTranslationAlmostComplete]] and dynamically adjust the speed so that your object never reach itself. | * If your object's original position is now a few cells away from the player, it will be unloaded by the game even if its graphics and collision box are close to the player. A workaround is to periodically translate your object to "self" through [[TranslateToRef - ObjectReference|TranslateToRef]]. This will not translate the mesh and collision geometry. However, if the translation completes, the position will be updated and you will see the object's mesh blink. To address this, you need to use [[OnTranslationAlmostComplete - ObjectReference|OnTranslationAlmostComplete]] and dynamically adjust the speed so that your object never reach itself. | ||
* [[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. | |||
== See Also == | == See Also == | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] |