UE2 Collision behaviors

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

sponge

New Member
Nov 5, 2008
3
0
0
Hi there,

I hope someone can help me on this issue which has become a little bit frustrating by now.

In our serious game the player should not hit too many objects. Hence we want to register the objects being hit. Think of trees, streetlights, animals, etc.

First I was using the Touch event to register the collision, but eventually noticed that trees have a large collision volume (because of the branches) which causes to register the "hit" while the truck has not hit the object at all. The tree (example) has a simple karma cylinder, and no collision objects in the branch top part.

The bump event only gets triggered when my player hits the truck or vice versa. (Vehicles/pawns). But I have become completely clueless how to get a proper Bump/HitWall/Some other collision event when my Karma truck hits the tree! I have already created a new StaticMeshActor type called DynamicMeshActor, to play around with the collision variables, but nothing seems to work.. .except the volume based Touch event.

Can anyone shed some light on this issue? I have tried many combinations with bStatic, bworldGeometry, etc. But it just won't work.

Code:
defaultproperties
{
	bStatic=false
	bWorldGeometry=false
	bDynamicLight = true
    bUseDynamicLights = true
	DrawType = DT_StaticMesh
	bCollideActors=True
	bCollideWorld=false
	bBlockActors=true
	bBlockPlayers=True
	bBlockKarma=true

	StaticMesh=StaticMesh'Editor.TexPropSphere'
}

and the events/functions I try to use:

Code:
function HitWall (vector HitNormal, actor Wall)
{
	Log("GPC HitWall: "@ Wall);
}

function Touch( actor Other )
{
	local int i;
	for (i = 0; i < Touching.length; i++)
	{
		Log("GPC Touch: " @ Touching[i]);
	}
	
	Super.Touch(other);
}

event Bump(Actor other)
{
	Log("GPC Bump" @ other);
	super.Bump(other);

}

Thanks in advance!
 

sponge

New Member
Nov 5, 2008
3
0
0
Hm, I recently learned about KImpact and the threshold, which seems to solved my problem at once ;)

:)