Results 1 to 9 of 9
  1. #1
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    98

    Default Touch event on staticmeshactor's collisionbox not actor's boundary

    Hi~,
    I got a staticmeshactor, set its collision box, and its touch event works fine.
    But I notice that the touch event just be fired when two actor's bounding box(the blue bounding box) touch each other.
    What I want is only the red collision box could fire the touch event.
    thanks for anyone's help.
    Code:
    DefaultProperties
    {
    	bMovable=true
    	bNoDelete=false
    	bStatic=false
    	bBlockActors=false
    
    	bCollideWorld=false
    	bCollideActors=true
    
    	bWorldGeometry=false
    
    	BlockRigidBody=false
    	
    	bCollideComplex=true
    	Begin Object Name=StaticMeshComponent0
    		StaticMesh=StaticMesh'PAK_TC.StaticMeshes.SM_Blocker01'
    
    		RBChannel=RBCC_GameplayPhysics
    		RBCollideWithChannels=(Default=TRUE,Pawn=true,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE)
    		bNotifyRigidBodyCollision=true
    		CollideActors=TRUE
    
    		bForceDirectLightMap=false
    		bUsePrecomputedShadows=false
    
    		bDisableAllRigidBody=true
    
    		BlockNonZeroExtent=False
    		BlockZeroExtent=false
    		BlockActors=false
    		BlockRigidBody=false
    	End Object
    }

  2. #2
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

  3. #3
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    98

    Default

    thanks vendorX, you mean I can add cylindercomponent ontop of it. but cylinder isn't too precise.
    Now I want get a touch event between a staticmesh blocker and my hook.
    It's something like that operation test,so a cylindercollision couldn't be perfect.

  4. #4
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    Find your SM in Content Browser and go to his properties and uncheck all Use Simple ... Collision

  5. #5
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    98

    Default

    Thanks VendorX, but it doesn't work...

  6. #6
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    Post your code...

  7. #7
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    98

    Default

    Code:
    class TCKAsset_Goods extends KAsset;
    event Tick( float DeltaTime )
    {
    	local TCSMA_Blocker TCSM;
                 TCSM=none;
                 TCGameInfo(WorldInfo.Game).m_TCSKA_TowerCrane.m_bIsGoodsTouchingBlockers=false;
    	ForEach TouchingActors(class'TCSMA_Blocker', TCSM)
    	{
    		if(TCSM!=none)
    			TCGameInfo(WorldInfo.Game).m_TCSKA_TowerCrane.m_bIsGoodsTouchingBlockers=true;
    	}
    }defaultproperties
    {
    	bWakeOnLevelStart=true	
    	bNoDelete=false
    	bCollideActors=true
    	bNoEncroachCheck=false
    	Begin Object  Name=KAssetSkelMeshComponent
    		RBChannel=RBCC_GameplayPhysics
    		RBCollideWithChannels=(Default=TRUE,Pawn=true,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE)
    		SkeletalMesh=SkeletalMesh'PAK_TC.SkeletalMeshes.SK_Floor'
    		PhysicsAsset=PhysicsAsset'PAK_TC.Physics.PA_Floor'
    		//CollideActors=true
    		bNotifyRigidBodyCollision=true
    		ScriptRigidBodyCollisionThreshold=0.001
    	End Object
    }
    this is a KAsset

  8. #8
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    98

    Default

    Code:
    class TCSMA_Blocker extends StaticMeshActor
     placeable;
    
    DefaultProperties
    {
    	bMovable=true
    	bNoDelete=false
    	bStatic=false
    	bBlockActors=false
    
    	bCollideWorld=false
    	bCollideActors=true
    
    	bWorldGeometry=false
    
    	BlockRigidBody=false
    	
    	bCollideComplex=true
    	Begin Object Name=StaticMeshComponent0
    		StaticMesh=StaticMesh'PAK_TC.StaticMeshes.SM_Blocker01'
    
    		RBChannel=RBCC_GameplayPhysics
    		RBCollideWithChannels=(Default=TRUE,Pawn=true,BlockingVolume=TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE)
    		bNotifyRigidBodyCollision=true
    		CollideActors=TRUE
    
    		bForceDirectLightMap=false
    		bUsePrecomputedShadows=false
    
    		bDisableAllRigidBody=true
    
    		BlockNonZeroExtent=False
    		BlockZeroExtent=false
    		BlockActors=false
    		BlockRigidBody=false
    	End Object
    }
    this is SMActor

  9. #9
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    98

    Default

    When KAsset touches the SMActor's boundary, the TouchingActors function and Touch event just will be fired...


 

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.