Editing ApplyHavokImpulse - ObjectReference
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 46: | Line 46: | ||
== Notes == | == Notes == | ||
* While the graphics and collision boxes are correctly moved by this function, [[GetPositionX - ObjectReference|GetPosition]] and [[GetAngleX - ObjectReference|GetAngle]] will return the old position. 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)] | |||
* | * A side-effect of the previous bug is that 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 update the position of your ship through [[SetPosition - ObjectReference|SetPosition]]. | ||
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). | 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). |