Lights being affected by array?

Hey,

I dont really know how to explain this, But if I use a collision box with an array, it effects my lighting to flicker.

Any ideas on how to stop the lights reacting to me adjusting my array of actors?

hello,

that sounds very weird. could you show the code?

maybe it’s having some side-effects.

100%, Ive just started on it again today. As Far as I could work out, It’s where the lights recalibrate after the array gets adjusted.

  • I thought it might have been the actor being sent back to the start, and it’s flicking past the camera for a single frame.
  • I then thought it might be driving through the collision box or entering a new piece of track, but wasn’t any of that either.
  • When I disconnect everything but remove, it doesnt do it.

So its something to do with removing the piece from the array.

Assumably its because Im using event tick to manage speed. that when the item gets removed and reput back in again, the event tick is having 1 frame where something happens.

Maybe a solution to this is remove the event tick and use movement componant.

the event tick is a bit dangerous, keep an eye on it.

also you’ve a bug. that “set actual speed” does not need to be inside the loop.

and by having it inside the loop you’ll make it so that it drifts during the loop, since it uses itself as the base number for the interp, it will be drifting upwards towards the end.

also consider using a tick interval.

i don’t understand why you need to remove and add (i understand you do it so it’s at the top of the list, but it makes no sense to me.) either use AddUnique or add it and use the last index of the list.

otherwise i’m pretty sure there’s a node for moving an item to a position. try “Swap” but possibly there’s another more specific.

how certain you are that is that code? have you tried removing the “remove” and proving that the flicker disappears?

Loops on tick need to go in C++.

New tick (frame) cannot start until all loops have finished execution. This means a loop can and will increase frame time, thus lowering FPS.