Announcement

Collapse
No announcement yet.

[Solved] Basics of Collision

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Solved] Basics of Collision

    Hello guys, i make some codes for my "game" that include new actor code. Here is my starting code:

    Code:
    class SCOW_Actor extends Actor placeable;
    
    
    
    DefaultProperties
    {
     Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
    		bSynthesizeSHLight=true
     End Object
     
     Components.Add(MyLightEnvironment)
    
     Begin Object Class=SkeletalMeshComponent Name=MyMesh
    	        Translation=(X=0,Y=0,Z=50)
    		CastShadow=true
    		bCastDynamicShadow=true
    		bOwnerNoSee=false
    		LightEnvironment=MyLightEnvironment
                    BlockRigidBody=true
                    CollideActors=true
                    BlockActors=true
                    BlockZeroExtent=true
    		SkeletalMesh=SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode'
      End Object
      
      	Begin Object Class=CylinderComponent Name=CollisionCylinder
    		CollisionRadius=10
    		CollisionHeight=10
    	End Object
    	CollisionComponent=CollisionCylinder
     
    
     Components.Add(MyMesh)
    }
    Problem is that I'm not very experienced with editor (working on it). My Skeletal Mesh doesn't collide. I checked BlockAll but it still doesn't work.

    #2
    Solved with PhysicsAsset

    Code:
    class SCOW_Actor extends Actor placeable;
    
    DefaultProperties
    {
     Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment
    		bSynthesizeSHLight=true
     End Object
     
     Components.Add(MyLightEnvironment)
    
     Begin Object Class=SkeletalMeshComponent Name=MyMesh
    	        Translation=(X=0,Y=0,Z=50)
    		CastShadow=true
    		bCastDynamicShadow=true
    		bOwnerNoSee=false
    		LightEnvironment=MyLightEnvironment
                    BlockRigidBody=true
                    CollideActors=true
                    BlockActors=true
                    BlockZeroExtent=true
    		PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics' //Here
    		AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_AimOffset'
    		AnimSets(1)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
    		SkeletalMesh=SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode'
      End Object
    
      Begin Object Class=CylinderComponent Name=CollisionCylinder
    		CollisionRadius=10
    		CollisionHeight=10
      End Object
      CollisionComponent=CollisionCylinder
      
     Components.Add(MyMesh)
    }

    Comment

    Working...
    X