Again With the Projectile Questons...

  • 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.

Sett

New Member
Jan 14, 2002
55
0
0
Visit site
OK I'm Designing a proj. that will only 'Destroy()' when it hits a wall.

ie. it will hit/kill many players/bots

my problem is the vector var.s HitLocation and HitNormal

the Sub -function ProcessTouch (Actor Other, vector HitLocation)
has HitLocation

while Sub - function HitWall( vector HitNormal, actor Wall )
has HitNormal

The problem- Sub -function explode- needs both
I've tryed temp var... and Explode(HitNormal,HitNormal);

And also what HitLocation and HitNormal actually do?

Is there any coded proj. that has the same behavior, that I could
view?
 
Okay, to my knowledge:

HitLocation is a vector that gives the exact point in space of the hit, just like a location vector;

HitNormal is actualy used more as rotator(hitnormal), to determin the rotation of the location hit, usualy for spawning effects that are flat on the wall, such as decals.

from decoration>dripgenerator>drip2
Code:
function Landed( vector HitNormal )
	{
		HitWall(HitNormal, None);	
	}

	simulated function HitWall (vector HitNormal, actor Wall) 
	{
		Destroy();
	}

Im sure there are also plenty of projectiles using a similar format. Also look at the projectile class.
 

EasyRaider

Crazy coder
Sep 21, 2001
74
0
0
44
Norway
You can use

Normal(HitLocation - Other.Location)

to find an approximate HitNormal in ProcessTouch() or you can just pass in vect(0,0,0).