Frictional Games Forum (read-only)
AttachPropToBone alternatives - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: AttachPropToBone alternatives (/thread-24032.html)



AttachPropToBone alternatives - Damascus - 12-05-2013

In Machine for Pigs, there is a script called AttachPropToBone, which attaches the centrifuge arms to the shuttles placed in it. I'm assuming it's used to connect a prop with an animated model. Here's an example:

AttachPropToBone("Shuttle_3_1", "CentrifugeArms", "compound_C_bone", 0.0f , 0.0f, 0.0f, 22.625f, 2.014f, -25.091f);

Unfortunately, this script doesn't exist in either TDD or the patch that is being released. Is there any other way to attach the shuttle to the arms of the centrifuge? I tried using AttachPropToProp, but the shuttle didn't appear when I used it. I tried just leaving the shuttle in there unattached, but it appears the centrifuge's actual Bodies stay put during the animation, so the shuttle just hovered there while it spun.

EDIT: Figured it out myself! I just scratched the animation altogether and rotated the model with a script. By placing the shuttles as static physics and making them rotate at the same speed, it essentially duplicated what I had in mind.