Hello my friend.
There is a lot of ways to assign a custom skeletal mesh to the player (Pawn).
I always prefeer the most simple way.
I am using the default UT3 Skeleton, I rig my custom chars to the UT3_Male Template:
https://docs.unrealengine.com/udk/Three/UDKCustomCharacters.html
https://docs.unrealengine.com/udk/Three/rsrc/Three/UDKCustomCharacters/UT3_Male.max
I use 3dsmax2009.
Supposing your game is also in 3rd person (I assume it is) you can use just this custom pawn class. What you basically needs to do is change defaultMesh. After you import the mesh into udk, you right-click on the imported asset inside the content browser, select copy full name to clipboard, then you paste on the defaultMesh field under the default properties of the custom Pawn Class (and recompile scripts):
class MyPawn extends UTPawn;
var SkeletalMesh defaultMesh;
var MaterialInterface defaultMaterial0;
var AnimTree defaultAnimTree;
var array<AnimSet> defaultAnimSet;
var AnimNodeSequence defaultAnimSeq;
var PhysicsAsset defaultPhysicsAsset;
//override to do nothing
simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)
{
Mesh.SetSkeletalMesh(defaultMesh);
Mesh.SetMaterial(0,defaultMaterial0);
Mesh.SetPhysicsAsset(defaultPhysicsAsset);
Mesh.AnimSets=defaultAnimSet;
Mesh.SetAnimTreeTemplate(defaultAnimTree);
}
//override to make player mesh visible by default
simulated event BecomeViewTarget( PlayerController PC )
{
local UTPlayerController UTPC;
Super.BecomeViewTarget(PC);
if (LocalPlayer(PC.Player) != None)
{
UTPC = UTPlayerController(PC);
if (UTPC != None)
{
//set player controller to behind view and make mesh visible
//since we are not using the Pawn.CalcCamera() function so camera animations (chainsaw execution, i.e) will work normally
UTPC.SetBehindView(true);
SetMeshVisibility(UTPC.bBehindView);
}
}
}
defaultproperties
{
** //here you must change the skeletal mesh**
defaultMesh=SkeletalMesh'ahmad_ghazzawi.Mesh.ahmad_ghazzawi'
CamOffset = (X=19, Y=15, Z=-22);
//CamOffset = (X=6, Y=15, Z=-22);
//x -> distance from camera
//y -> horizontal position
//z -> vertical position
Drawscale=0.95
Health=100
HealthMax=100
GroundSpeed=400.0
bPhysRigidBodyOutOfWorldCheck=TRUE
bRunPhysicsWithNoController=true
LeftFootControlName=LeftFootControl
RightFootControlName=RightFootControl
bEnableFootPlacement=true
MaxFootPlacementDistSquared=56250000.0 // 7500 squared
bPushesRigidBodies=true
}
The best way to avoid problems when importing custom characters in UDK is to use the default UDK Skeleton (UT3). Aswell using the default AnimationTree. Anyway, you can always change (is what I have done). I created some custom animation trees, by changing the default AnimationTree instead of creating one from scratch.
But if you are facing problems when importing meshes to UDK, you must read this tutorial here:
https://docs.unrealengine.com/udk/Th…hPipeline.html