I am following a tutorial on Udemy on Unreal Engine based game development. I have posted the sam question on Udemy as well. I will try my best to explain the issue I am facing.
What works
I have set up a
- GameMode named
FPS_GameMode, - GameInstance named
FPS_GameInstance, - HUD named
FPS_HUD
I have set the HUD in FPS_GameMode to FPS_HUD.
I have assigned the FPS_GameMode as GameMode in project settings.
Now I have created 2 blueprints MainHUD and UI_DynamicCrosshair. UI_DynamicCrosshair consists of functionality related to resizing the crosshair if the character is moving. (It spreads out if the character is moving).
I have used this crosshair in the MainHUD (used UI_DynamicCrosshair in the MainHUD's viewport).
In my FPS_Character blueprint, I am creating the MainHUD widget and adding it to the viewport.
The crosshair widget shows up when I play the game but it does not update when my character moves.
What doesn't work
I need to call the functionality defined in my UI_DynamicCrosshair, in FPS_Character so that I can trigger it when the character moves.
For that, I tried using the MainHUD reference as it is accessible in the FPS_Character blueprint assuming that I would be able to access the UI_DynamicCrosshair via the MainHUD reference. But this doesn't work. The UI_DynamicCrosshair is not accessible via the MainHUD reference.
Can you share a checklist/list-of-steps so that I can crosscheck everything I have done and figure out what I have missed?
Please let me know if you need more details.