Line Trace Efficiency on Mobile

Hello all,

I have a quick question about line trace efficiency. I can’t seem to see much on this, but basically I have a reasonable amount of intensive things in my mobile game (physics, particle systems etc) and was wondering if adding multiple line traces is going to cost much in performance.

The usage is to check for a player crossing a beam object, does anyone know if having 3/4 line traces per tick will take up much overhead on mobile?

On My 5S I can’t see a frame rate drop running 4 traces per tick, so would I be correct in assuming this is the best way to do this?

Thanks.

Few traces per tick should be not a problem.

However for limiting tick activity, i found that many things usually done per tick can be done 3-4 times per second without losing much. For eg boids or enemy AI, slight delay makes them even look more natural.

So we made our own tick (called it pulse). Player controller has per pulse event and calls it every 0.1 sec or so, and sends incrementing integer (just like delta seconds).
Then everything that need to be done on regular basis binds to that “per pulse” dispatcher. Then i control how ofter those lesser blueprints fire on per pulse with modulo (integer) some do it every 3rd some 5th etc.

I stopped using timers because code gets messy fast, they fine when you have 2-3 timers with more it is a mess. Esp when you reference them by text name.
D

Interesting idea, the player can move quite fast in my game and I wouldn’t want them to get through the beam without turning it off (though limiting this to once every 2 ticks might be fine).

I have a few things ticking so I think I’ll utilise your pulse idea, thanks for your help Narwot!

Doug