Game Development Community

Editing LinkPoints/Mounts at runtime?

by Dan MacDonald · in Torque X 2D · 03/31/2007 (7:29 pm) · 1 replies

So from what I can tell looking at how T2DSceneObjects are mounted to one another in the TGBX editor, it seems they get mounted to linkpoints that can be moved around. Unfortunatly from the code side there doesn't seem to be any way to enumerate or iterate an objects LinkPoints or edit the position of that linkpoint.

The real thing I'm trying to accomplish is to change the mount position of a mounted object via code at runtime.

Any ideas on how to accomplish this would be enlightening :D

#1
03/31/2007 (11:55 pm)
So it seems you can use "AddLinkPoint" to update an exsisting linkpoint.

position.Y = -0.24461f;
legsObject.LinkPoints.AddLinkPoint("bodyLinkPoint", position, rotation);

it seems AddLinkPoint will update an existing linkpoint if you try to add a link point with the same name as an existing one.