How can I rotate an actors pivot point?

I would like to alter the existing pivot point of an actor, specifically the orientation of that pivot point. If the actors X axis (forward) is inline with the worlds, but I want to rotate it so that the x axis of this actor is now 45 degrees to the left (between where X was pointing and where Y was pointing), how would I got about doing this in code?

You should just use something like this:

// Apply the pivot offset    
FTransform newTransform = GetTransform();
newTransform.ConcatenateRotation(MyPivotOffset);

// Apply the rotation you want
newTransform.ConcatenateRotation(MyRotation);
newTransform.NormalizeRotation();
SetActorTransform(newTransform);

but where do I add this?? Sorry I’m new to Unreal Engine.