View Full Version : Attaching a separate head to a custom body
06-14-2011, 04:48 PM
Hi guys, I've created a new character class based on UTFamilyInfo_Liandri. I've imported a skeletal mesh body (no head) with bones, animsets and its functioning.
The head is a separate skeletal mesh and I've been looking through tutorials and the forums and can't seem to locate an appropriate example of how to create a custom character with a separate head (I'd also like to do attach a separate skeletal mesh of equipment the character is wearing and attach that on the characters body).
What does the code look like (does is use sockets) and should it be placed in UTFamilyInfo_Liandri, UTFamilyInfo_Liandri_Male or somewhere else?
06-14-2011, 05:43 PM
06-14-2011, 06:25 PM
Thanks Solid Snake!
06-14-2011, 08:34 PM
Thanks, I've created the Modular pawn class, placed it in a scene, brought together my meshes, attached the default animtree AnimTree'CH_AnimHuman_Tree.AT_CH_Human', added Physics Assets, my AnimSets set and commented out the line "Animations=AnimNodeSequence" within the object HeadSkeletalMeshComponent.
How Do I tell my version of the UTFamilyInfo_Liandri class to use this instance of the modular pawn. The modular pawn with all the skeletal mesh attachments and settings not the empty modular pawn in the content browser.
06-15-2011, 03:39 PM
After tinkering with the Modular pawn I realized that its not going to work because the AnimTree is based on the UDK bone structure. MY characters and animsets are not. My version of the mesh, animsets and UTFamilyInfo_Liandri class are working and all I want to do is to link a second mesh to my first one. Is there a way to accomplish this with unrealscript using sockets?
06-15-2011, 05:46 PM
You can use whatever AnimTree you want.
06-15-2011, 05:52 PM
careful, if you use the UDK gems tutorial your body parts' bounds will not update as the model animates, resulting in them totally disappearing at certain mostly close-up angles. ie, the visible mesh will be at the animated position but its bounds (and therefore, visibility calculation) will be at the base position.
I've posted a thread asking for a workaround but I haven't gotten a solution :/
06-15-2011, 06:09 PM
Thanks Chosker, I'll keep that in mind. Solid Snake, I realized I had and animation preset, removed it and fixed the issue. i'm still not sure how to implement this modular pawn with my UTFamilyInfo_Liandri class with the head/body attachments, animsets and such?
06-16-2011, 02:36 AM
this tutorial actually removes the use of the UTFamilyInfo feature, because all meshes are set from within the pawn
if you'd want to use the UTFamilyInfo feature, you'd probably need to make sure your pawn executes the SetCharacterClassFromInfo function, and move all the modularity-related code into your UTFamilyinfo class
06-17-2011, 09:10 PM
Right, so I'm not as concerned with the family at this point cuz I'm going to call the Modular Pawn with an actor factory.
The issue I'm now having is the Components.Remove(WPawnSkeletalMeshComponent)
is getting rid of body and the weapon. I don't want to add the weapon back as a modular piece because the original weapon has a ton of functionality that I'm hoping not to have to recode. any suggestions?
06-18-2011, 03:23 AM
I don't see why removing the Pawn's skeletalmeshcomponent gets rid of the weapon but if it does for you, it does.
the tutorial makes you remove all mesh components, then add a base mesh, then add the rest of the meshes. in my case, I made it so the base mesh was the already existing mesh instead of removing it (else my pawn would become like 2 times bigger, no idea why), so just try changing the default mesh component to suit the needs of your base mesh, then add the rest as in the tutorial
06-20-2011, 07:22 PM
Yeah that works but the issue is that my base mesh is called from CharClassInfo=class'UTGame.UTFamilyInfo_Landri_Mal e' in UTPlayerReplicationInfo. I'd prefer to have different base body types and since UTPlayerReplicationInfo is called in UTgame I believe this method leaves me withonly 1 body type to add parts to.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.