Hi,
I did a lot of test and it seems that the Physics Asset of a Pawn is not updated on a dedicated server even if we force it to do.
How to test:
1- Set the sample code that you can find at the end of the post
2 - Create a game server dedicated
3- Connect 2 client onto hit
4 - Run the exec "NXVIS Collsion" to see the physics asset
5 - Try to hit the Head Box
The gun is an instantfire, only performing a trace to know if we are hitting or not the pawn. You will see that the pawn is never hitten.
I tried also to force the SkeletalMesh update by ForceSkelUpdate(). I did it during the tick, before doing the trace without any change in the behaviour.
But this should not be needed due to bUpdateSkelWhenNotRendered=True.
I did some test on a listened server and it works.
If you need more information, please ask. If it's working on your end, I will apreciate your feedback on how you get it working.
I'm based on the latest UDK, with UT asset.
Thanks,
Sample Code to Highlight the issue:
I did a lot of test and it seems that the Physics Asset of a Pawn is not updated on a dedicated server even if we force it to do.
How to test:
1- Set the sample code that you can find at the end of the post
2 - Create a game server dedicated
3- Connect 2 client onto hit
4 - Run the exec "NXVIS Collsion" to see the physics asset
5 - Try to hit the Head Box
The gun is an instantfire, only performing a trace to know if we are hitting or not the pawn. You will see that the pawn is never hitten.
I tried also to force the SkeletalMesh update by ForceSkelUpdate(). I did it during the tick, before doing the trace without any change in the behaviour.
But this should not be needed due to bUpdateSkelWhenNotRendered=True.
I did some test on a listened server and it works.
If you need more information, please ask. If it's working on your end, I will apreciate your feedback on how you get it working.
I'm based on the latest UDK, with UT asset.
Thanks,
Sample Code to Highlight the issue:
Code:
class TestGame extends UTGame; DefaultProperties { DefaultPawnClass=class'TestPawn'; DefaultInventory(0)=class'TestWeapon' }
Code:
class TestPawn extends UTPawn; DefaultProperties { Begin Object class=SkeletalMeshComponent Name=SkeletalMeshComponent0 bHasPhysicsAssetInstance=true bPerBoneMotionBlur=true BlockZeroExtent=true BlockRigidBody=true CollideActors=true PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics' AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale' AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human' SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA' // WARNING: Make sure this is NEVER false! // Otherwise, stuff won't work right on dedicated servers. bUpdateSkelWhenNotRendered=True End Object Mesh=SkeletalMeshComponent0 Components.Add(SkeletalMeshComponent0) // Cylinder Begin Object Name=CollisionCylinder CollisionRadius=40.0 CollisionHeight=100.0 BlockZeroExtent=false End Object CylinderComponent=CollisionCylinder CollisionComponent=CollisionCylinder }
Code:
class TestWeapon extends UTWeapon; DefaultProperties { WeaponColor=(R=255,G=255,B=0,A=255) PlayerViewOffset=(X=16.0,Y=-18,Z=-18.0) // PlayerViewOffset=(X=0,Y=0,Z=-0) Begin Object class=AnimNodeSequence Name=MeshSequenceA bCauseActorAnimEnd=true End Object Begin Object Name=FirstPersonMesh SkeletalMesh=SkeletalMesh'WP_LinkGun.Mesh.SK_WP_Linkgun_1P' AnimSets(0)=AnimSet'WP_LinkGun.Anims.K_WP_LinkGun_1P_Base' Animations=MeshSequenceA Scale=0.9 FOV=60.0 End Object AttachmentClass=class'UTAttachment_ShockRifle' // Pickup staticmesh Begin Object Name=PickupMesh SkeletalMesh=SkeletalMesh'WP_LinkGun.Mesh.SK_WP_LinkGun_3P' End Object FireOffset=(X=0,Y=0,Z=0) InstantHitDamageTypes(0)=class'UTDmgType_LinkPlasma' InstantHitDamageTypes(1)=class'UTDmgType_LinkPlasma' WeaponFireTypes(0)=EWFT_InstantHit WeaponFireTypes(1)=EWFT_InstantHit InstantHitDamage(0)=60 InstantHitDamage(1)=60 InstantHitMomentum(0)=10000.0 WeaponFireSnd[0]=SoundCue'PF_SR_TUT.Sound.Fire4' WeaponFireSnd[1]=SoundCue'PF_SR_TUT.Sound.Fire4' WeaponEquipSnd=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_RaiseCue' WeaponPutDownSnd=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_LowerCue' //WeaponFireSnd(0)=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_FireCue' ZoomOutSound=SoundCue'A_Weapon_Sniper.Sniper.A_Weapon_Sniper_ZoomOut_Cue' ZoomInSound=SoundCue'A_Weapon_Sniper.Sniper.A_Weapon_Sniper_ZoomIn_Cue' //ZoomLoopCue=SoundCue'A_Pickups_Powerups.PowerUps.A_Powerup_JumpBoots_GroundLoopCue' MaxDesireability=0.7 AIRating=+0.3 CurrentRating=+0.3 bFastRepeater=false bInstantHit=true bSplashJump=false bRecommendSplashDamage=false bSniping=true ShouldFireOnRelease(0)=0 ShouldFireOnRelease(1)=0 InventoryGroup=1 GroupWeight=0.5 PickupSound=SoundCue'A_Pickups.Weapons.Cue.A_Pickup_Weapons_Link_Cue' EffectSockets(0)=MuzzleFlashSocket MuzzleFlashSocket=MuzzleFlashSocket MuzzleFlashPSCTemplate=ParticleSystem'PF_SR_TUT.Particles.P_SniperRifle_MuzzleFlash' MuzzleFlashLightClass=class'UTGame.UTRocketMuzzleFlashLight' bShowAltMuzzlePSCWhenWeaponHidden=TRUE MuzzleFlashColor=(R=120,G=255,B=120,A=255) MuzzleFlashDuration=0.33; IconX=451 IconY=448 IconWidth=54 IconHeight=51 CrossHairCoordinates=(U=384,V=0,UL=64,VL=64) LockerRotation=(pitch=0,yaw=0,roll=-16384) IconCoordinates=(U=453,V=467,UL=147,VL=41) AmmoCount=100 LockerAmmoCount=100 MaxAmmoCount=6 WeaponRange=3000 // Configure the zoom bZoomedFireMode(0)=0 bZoomedFireMode(1)=0 //Fire Mode 2 = Zoom bZoomedFireMode(2) = 1 ZoomedTargetFOV=12.0 ZoomedRate=30.0 }
Comment