EndTraceLoc = 4096 * Normal(Vector(Pawn(Owner).ViewRotation));
foreach TraceActors(Class'Pawn', NewTarget, HitLocation, HitNormal, EndTraceLoc, Location, vect(256,256,256))
{
Log(NewTarget);
I'm tracing a line from me straight out 4096 units(I think), with an extent box of 256x256x256. Now I clearly have the class set to Pawn, indicating to me that it should only find pawns as that is how all the other foreach statements work. What I can't quite figure out is why in gods name is it hitting things other than pawns? Here is a snippet from the log showing what it is hitting.
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.TFemale2Bot0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.Trigger3
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.Razor3
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
As you can see 99% of the time the trace is hitting the levelinfo(level? nothing?). It can also hit projectiles like razors and rockets. It somehow managed to hit a single bot, once, and it then did the proper code. I don't know why it's hitting all that other stuff though it should only hit bots. Does anyone know how I can set this up so it only counts hits against pawns (ie it ignores the level and projectiles and everything else and only collides with pawns)? That's all I need to do really. Send out a trace straight out and see which pawn it hits first, though it MUST be an extent trace and all the traces I've tried that have that option seem to hit EVERYTHING regardless of what settings you give it.
foreach TraceActors(Class'Pawn', NewTarget, HitLocation, HitNormal, EndTraceLoc, Location, vect(256,256,256))
{
Log(NewTarget);
I'm tracing a line from me straight out 4096 units(I think), with an extent box of 256x256x256. Now I clearly have the class set to Pawn, indicating to me that it should only find pawns as that is how all the other foreach statements work. What I can't quite figure out is why in gods name is it hitting things other than pawns? Here is a snippet from the log showing what it is hitting.
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.TFemale2Bot0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.Trigger3
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.Razor3
ScriptLog: CTF-Face.LevelInfo0
ScriptLog: CTF-Face.LevelInfo0
As you can see 99% of the time the trace is hitting the levelinfo(level? nothing?). It can also hit projectiles like razors and rockets. It somehow managed to hit a single bot, once, and it then did the proper code. I don't know why it's hitting all that other stuff though it should only hit bots. Does anyone know how I can set this up so it only counts hits against pawns (ie it ignores the level and projectiles and everything else and only collides with pawns)? That's all I need to do really. Send out a trace straight out and see which pawn it hits first, though it MUST be an extent trace and all the traces I've tried that have that option seem to hit EVERYTHING regardless of what settings you give it.