Why some const Actor functions are not const

Hello,

Is there any reason why these fuction are not const? They dont change anything. I need them to be const because of my functions that use them.

float GetDistanceTo(AActor* OtherActor);

float GetHorizontalDistanceTo(AActor* OtherActor);

float GetVerticalDistanceTo(AActor* OtherActor);

float GetDotProductTo(AActor* OtherActor);

float GetHorizontalDotProductTo(AActor* OtherActor);

You want it to return const float? why not do :

const float Value = (const float) GetDistanceTo(OtherActor);

Oh ok thank you.

You are welcome :slight_smile: Please mark the answer as correct to close the question :slight_smile:

Anyway. My solution was to use const_cast(Object) to call this functions within const functions.