For now as its shown in figure I am using an array of references to Actors and when I need it I use GetActorLocation, but it seems to me that it is inefficient with respect to storing a pointer directly to the locations, since I might have to do this operation many times I was looking for an alternative.
Actor locations are structs that are updated every frame internally. Retrieving it is a constant operation, so there’s no need to worry about the performance.
Some advice: Don’t worry about performance until you have proof that your logic is slowing down your game (ie. you notice something in the profiler). Wasting your time on things like this can distract you from actually completing your game.
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.