How do you cast MyHUD from AHUD* to myCustomHUD*?

Hi guys,
At the moment I am trying to call a function in MyHUD from the player controller. The problem is that MyHUD is an AHUD* and I need it to be a myCustomHUD* because the function I implemented is on myCustomHUD class. The Game Mode already knows what myCustomHUD class is because of the following line

// use our custom HUD class
HUDClass = AThesisTestHUD::StaticClass();

I tried to use Cast< AThesisTestHUD* >( MyHUD ) but that fails.

Does anyone know how to do this?

AThesisTestHUD* MyOwnHUD = Cast(GetHUD());

You first declare pointer to your hud class.

Then you use Cast. Cast is typed, and you need use type name to which want to cast. In <> you have added pointer.

Thanks iniside. That works.