trace is expensive

42 pawns doing 1 trace every second = -5 fps?

that cant be right.


GetAxes(self.Rotation, Xa,Ya,Zaa);

  InFront = self.Location + 150 * Xa + 50 *zaa;

  HitActora = Trace(HitLoca, HitNormala, InFront, self.Location);

More long the trace, more slow…

surely 150 uu isnt a long trace though?

Hmmm interesting. I’ve always been super cautious of my use of traces, but recently have started benchmarking and am finding them extremely cheap. While playing around the other day, i had 300+ actors doing 8 traces each, all on the same tick, and there wasn’t even blip in the framerate.

Are you sure there’s not something else happening after your trace that is causing the fps drop?

“-5 fps” means nothing. If you’re running at 1000 fps, and now run at 995 fps, then the time for a frame went from 1.000 milliseconds to 1.005 milliseconds.

Try this: comment out the Trace (or route around the blueprint node) and run the exact same code, just without the trace. What does it change in FPS?
If you do something when the trace hits, then change the code to run that something each time, to make it fair.

im running at 60 fps and have worked hard to keep it there.so -5fps is noticeable,especially as 40 zombies is the lower end of the scale.at 60 zombies im running at 40 to 45 fps.without the trace its around 58 fps with 60 zombies.
I made the trace globally toggleable to check and it is the cause.

Coldscooter:thought the same thing and that is my priority this morning.

I am unable to replicate the problem this morning.toggling the trace makes no real difference.

I guess something external was eating resources.now to try and track that down.

thanks for the input.

Separately, which mode are you testing performance in? A standalone, cooked, game executable is the best way to get an accurate measurement.

in game,but not a cooked executable.but this is what I was comparing too from the previous session.

the problem returned this afternoon after I had some other programs open to do some sound work.restarting the pc solved it.

I think the main culprit is the newest version of shadowplay.NVidia claim its 3x faster and less power hungry.im doubting that at the minute.