PDA

View Full Version : Override UTPawn mesh with custom mesh..



Gateway
01-28-2010, 01:33 PM
I would like to use my own Pawn mesh which has been modeled and rigged to the UT chr and imported into UDK, how ever when I try to override this value in mypawn.uc which extends utpawn it doesn't change the chr.

Here is the code used to try to override the pawn with my own mesh, this is in default properties.


DefaultProperties
{

Begin Object Name=MyLightEnvironment
ModShadowFadeoutTime=0.25
MinTimeBetweenFullUpdates=0.2
AmbientGlow=(R=.01,G=.01,B=.01,A=1)
AmbientShadowColor=(R=0.15,G=0.15,B=0.15)
LightShadowMode=LightShadow_ModulateBetter
ShadowFilterQuality=SFQ_High
bSynthesizeSHLight=TRUE
End Object
Components.Add(MyLightEnvironment)

Begin Object Class=SkeletalMeshComponent Name=InitialSkeletalMesh
CastShadow=true
bCastDynamicShadow=true
bOwnerNoSee=false
LightEnvironment=MyLightEnvironment;
BlockRigidBody=true;
CollideActors=true;
BlockZeroExtent=true;
PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_C H_Corrupt_Male_Physics'
AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman _AimOffset'
AnimSets(1)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman _BaseMale'
AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_ Human'
SkeletalMesh=SkeletalMesh'MeshTest.Mesh.TestMan'
End Object

Mesh=InitialSkeletalMesh;
Components.Add(InitialSkeletalMesh);

// added to stop the pawn from floating in the air.. not sure why it does.
Begin Object Name=CollisionCylinder
CollisionRadius=+0021.000000
CollisionHeight=+0048.000000
End Object

CylinderComponent=CollisionCylinder

InventoryManagerClass=class'MyInventory'
JumpZ=450 // overide default jump height.
BaseEyeHeight=38.0
EyeHeight=38.0
GroundSpeed=440.0
AirSpeed=440.0
WaterSpeed=220.0
AccelRate=6048.0
bLimitFallAccel=true
}

any idea why the default UT mesh continues to show up and not use mine ?

Contagion
01-28-2010, 02:29 PM
Though this doesn't use UTPawn this may help you understand.
http://www.youtube.com/watch?v=avLfOrCmj2s

Also UTPawn has a few functions that set the character's mesh because it doesn't use a defaultproperties for defining that information. You would need to make some alterations to the code to stop this update. The easiest way to change the mesh in UTPawn is to edit the family info.

Gateway
01-28-2010, 02:44 PM
yea thanks, that requires you to use GamePawn and not UTpawn..