|
|
|
|
|
Please take note! For mod developers working with Unreal Tournament 2003, this documentation is meant to be a starting point for your own explorations into UT2003, not a definitive guide. There will be differences between the documentation here and the product in your hands, and you may have to figure out quite a bit for yourself. Check out the Unreal Tournament 2003 page in the Unreal Powered area for links to community sites if you're having problems. UDN is a licensee support site, and cannot provide technical support or game-specific assistance to end users.
|
|
|
|
SkeletalAttachments |
|
|
|
|
|
Licensees can log in.
Interested in the Unreal engine? Check out the licensing page.
Questions about UDN itself? Contact the UDN Staff.
|
|
|
|
|
|
|
|
|
Last updated by Erik de Neve (EpicGames). Original author was Erik de Neve (EpicGames).
This is crude, quick and dirty, preliminary documentation on the attachment system. Please update it.
Any actor can be dynamically attached to a bone of a skeletal mesh - or rather, to a bone's special tag (a 'socket'). The tags are defined at package build time using #exec statements, as in this example:
#exec MESH ATTACHNAME MESH=WarriorMesh BONE="right_wrist_2"
TAG="weaponbone" YAW=-64.0 PITCH=00.0 ROLL=128.0 X=0 Y=0 Z=0
The BONE= parameter needs to be the bone exactly as it was named in Max or Maya, while the TAG= string is an arbitrary, meaningful name with which AttachToBone() will be able to work. The rotation and translation adjustments on the same line are optional.
Once defined in this way, tagnames will also work with most other commands that take bone names as input, though the adjustment is not relevant in those cases.
Now, for the actor that owns the WarriorMesh, you use AttachToBone(Actor, 'tagname') . Any actor can be attached, like weapons and particle effects, and they are rendered (recursively, but without checking for circular dependencies) only when their base actor is visible and being rendered, so no separate visibility determination is executed for them.
An example:
if ( Weapon != None )
{
// Attach new weapon (includes a SetBase)
WarriorMesh.AttachToBone(Weapon,'righthand');
}
And you can detach the actor with:
WarriorMesh.DetachFromBone(Weapon);
Of course, once detached, then there has to be code to either delete or manage the location of Weapon, otherwise it might hang in the world where you detached it.
|
|