Results 1 to 2 of 2
  1. #1
    MSgt. Shooter Person
    Join Date
    Jun 2010
    Posts
    453

    Default [PhysicAsset + Script] My Character Is Floating and wont come Down

    So i created my character and Scripted some code for it .

    But ingame , the character "floats" above ground , and just disappears when destroyed/killed. So No Rag-doll Effect Whatsoever

    I have checked His Physics asset And Every thing is Normal .

    WHY AM I Posting Here ? this is content creation not script

    actually i think i have to do something in script because my character is a UDKPawn not UTPawn So i might be doing something wrong.

    Character complete CODE :
    Code:
    class MM_Trooper extends UDKPawn
    	placeable;
    
    /**Color coding for pawns*/
    var(MassMayhem) int ColorCode;
    
    /**Side Coding for pawns*/
    var int SideCode;
    
    /**Used to give different sides Materials */
    var MaterialInterface FactionMaterials[2];
    
    
    simulated function PostBeginPlay()
    {
    	super.PostBeginPlay();
    	SetColors(ColorCode);
    	CreateInventory( class 'Bob.MM_Ar' , False );
    	self.SetPhysics(PHYS_Falling);
    }
    
    
    
    
    function SetColors(int ColorCodeNumber)
    {
    	if(ColorCode == 0)
    	{
    		Mesh.SetMaterial(0 , FactionMaterials[0]);
    		Mesh.SetMaterial(1 , FactionMaterials[0]);
    	}
    
    	if(ColorCode == 1)
    	{
    		Mesh.SetMaterial(0 , FactionMaterials[0]);
    		Mesh.SetMaterial(1 , FactionMaterials[0]);
    	}
    
    	if(ColorCode == 2)
    	{
    		Mesh.SetMaterial(0 , FactionMaterials[1]);
    		Mesh.SetMaterial(1 , FactionMaterials[1]);
    	}
    }
    
    
    DefaultProperties
    {
    	
        Begin Object Name=CollisionCylinder
    	CollisionHeight=+44.000000
        end object
        Begin Object class=SkeletalMeshComponent Name=MMSkeletalMesh
     	SkeletalMesh=SkeletalMesh'MassMayhem.SkeletalMesh.Trooper'
    	AnimSets(0)=AnimSet'MassMayhem.Anims.MM_anim_Human'
    	AnimTreeTemplate=AnimTree'MassMayhem.AnimTree.Human_Trooper'
    	PhysicsAsset=PhysicsAsset'MassMayhem.PhysicAsset.Trooper_Physics'
    	HiddenGame=false
    	HiddenEditor=FALSE
    	bOverrideAttachmentOwnerVisibility=true
    
        End Object
        Mesh=MMSkeletalMesh
        Components.Add(MMSkeletalMesh)
        bJumpCapable=false
        bCanJump=false
        GroundSpeed=300.0 
    	FactionMaterials[0] = Material'MassMayhem.Materials.Trooper_Material_RED'
    	FactionMaterials[1] = Material'MassMayhem.Materials.Trooper_Material_BLUE'
    
    	InventoryManagerClass = class'Bob.MM_InventoryManager'
    	ControllerClass = Class'Bob.MM_Trooper_AI'
    }
    I 4M 4LW4Y5 H3LPFUL. 4T L345T ! BuMp3D Y0uR THr34D.

  2. #2

    Default

    Code:
    Begin Object Name=CollisionCylinder
    	CollisionHeight=+44.000000
        end object
    Change it to the appropriate height. You can use the Show Collision command to see the height.

    As for ragdoll, I believe that is defined in the UT classes, so you will need to setup the ragdoll on death stuff yourself.
    I'm making a game!

    http://www.desura.com/games/modulated
    Click the link above to read more!


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.