Is it make sense put GetActorLocation and similar functions in variable?

Hello, community!

Sometimes I need to use functions GetActorLocation, GetForwardVector, GetCapsuleHalfHeight, and other in different functions which works every tick. Is it make sense to cache the result of these functions at the beginning of Event Tick or the engine cache itself? I am asking from an optimization point of view.

I really appreciate any help you can provide


If you are using an excessive amount of them they could affect performance, but I wouldn’t be too worried. However whatever you are doing on event tick could affect performance a lot so I would make sure only things that must happen on the tick are done on the tick.