That makes sense, and actually that's exactly what I am trying.
Here is the code of my two test classes for this problem :
a sub-TriggerVolume :
Code:
class MyTriggerVolume extends TriggerVolume
placeable;
event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal ) {
`log("MyTriggerVolume Touch");
if (OtherComp != NONE && MyKActor(OtherComp.Owner) != NONE)
`log("Touches MyKActor");
}
event RigidBodyCollision(PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent,
const out CollisionImpactData RigidCollisionData, int ContactIndex)
{
`log("MyTriggerVolume RBCollision");
if (OtherComponent != NONE && MyKActor(OtherComponent.Owner) != NONE)
`log(">>>>>>>>>>>>>>>> MyKActor RB-DETECTED <<<<<<<<<<<<<<<<");
}
defaultproperties
{
Begin Object name=BrushComponent0
CollideActors=true
BlockZeroExtent=true
BlockNonZeroExtent=true
bNotifyRigidBodyCollision=true
ScriptRigidBodyCollisionThreshold=0.0001
RBChannel=RBCC_GameplayPhysics
RBCollideWithChannels=(GameplayPhysics=true)
End Object
CollisionComponent=BrushComponent0
bNoEncroachCheck=false
bIgnoreEncroachers=false
bCollideActors=true
}
and a sub-KActor :
Code:
class MyKActor extends KActor
placeable;
event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal ) {
`log("MyKActor Touch");
if (OtherComp != NONE && MyTriggerVolume(OtherComp.Owner) != NONE)
`log("Touches MyTriggerVolume");
}
event RigidBodyCollision(PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent,
const out CollisionImpactData RigidCollisionData, int ContactIndex)
{
`log("MyKActor RBCollision");
if (OtherComponent != NONE) {
if (BrushComponent(OtherComponent) != NONE)
`log("BrushComponent RBC-DETECTED");
if (MyTriggerVolume(OtherComponent.Owner) != NONE)
`log("################ VOLUME RBC-DETECTED ################");
}
}
defaultproperties
{
Begin Object name=StaticMeshComponent0
StaticMesh=StaticMesh'LLBPackage.Balls.Ball5.LLB_Ball5'
CollideActors=true
BlockZeroExtent=true
BlockNonZeroExtent=true
bNotifyRigidBodyCollision=true
ScriptRigidBodyCollisionThreshold=0.0001
RBChannel=RBCC_GameplayPhysics
RBCollideWithChannels=(GameplayPhysics=true)
End Object
CollisionComponent=StaticMeshComponent0
Physics=PHYS_RigidBody
bWakeOnLevelStart=true
bCollideAsEncroacher=false
bNoEncroachCheck=false
bIgnoreEncroachers=false
bCollideWorld=true
bCollideActors=true
}
I have created a map where a MyKActor (a ball in this case) rolls down and go in the trigger volume (a MyTriggerVolyme, of course).
- The ball rolls and collides very well with the world, bsp, staticmesh, other KActors, etc.
- The Touch event is called, I can see my four different logs in both classes ("MyTriggerVolume Touch", "Touches MyKActor", "MyKActor Touch" and "Touches MyTriggerVolume").
- I can see the "MyKActor RBCollision" log almost every frame when it rolls on the ground, but never when it hits the volume (no "MyKActor RBCollision" when the ball enters in and no "VOLUME RBC-DETECTED" log).
As you can see, I have tried many properties, true/false on theses and others... changing chanels, the value of ScriptRigidBodyCollisionThreshold...
Any idea ? 
(Even better, if someone thinks he can make it work and can try to code this successfully, it would be great !
)
Bookmarks