How to Rotate Camera Automatically Based on Pawn's Direction of Movement?

You could also Get Velocity | Unreal Engine Documentation + Normalize | Unreal Engine Documentation knowing the ball will have physics enabled. This will give you a unit direction vector of the ball on every frame. No need to store value of prev frame ( but IMO it won’t hurt to understand how that logic works ).

It needs to be a child for it to move with the sphere. The alternative is to set the rotation and location on every frame. I added the arrow just to debug if the math worked. You can add how ever it works for you and delete it later.