3

Im new to unreal I have a problem with the communication from Hud_Blueprint to Level_Blueprint.
I want to have a slider in the Hud which controls the rotation of a cube in the level.

In the Hud_Blueprint i have the slider I made in a Widget_Blueprint. Works perfect, printline values from 0 to 1. I tried to use a Interface_Blueprint, like in the following link without success. https://answers.unrealengine.com/questions/22126/pass-variable-from-hud-blueprint-to-level-blueprin.html

my Blueprints: https://www.dropbox.com/s/k30ah9fjuwlff6x/zusammen.jpg?dl=0 (404 response)

Seems like i have no connection between the Blueprints.
The function works just in the Hud_Blueprint.

Pimgd
  • 5,505
  • 1
  • 26
  • 44

2 Answers2

0

Well, your problem is maybe solved, but someone can find it helpful:

First, create new WidgetBlueprint and name it "Slider".

In Slider editor create Event Dispatcher called "ValueChanged" with float input. In designer, add slider and add it's OnValueChanged. From that node you must call ValueChanged with obtained Value as parameter.

In level blueprint, on EventBeginPlay create SliderWidget and Add (return value) To Viewport. You must promote Slider to variable to use it in next step - Assign ValueChanged with new event which will cover up rotation login in it's execution. See image at Dropbox

Pavel Pája Halbich
  • 1,404
  • 2
  • 17
  • 20
0

If you select your cube in the level outliner and drag that into your HUD_BP you can obtain a reference to the object that way. You can then drag a pin off the object reference and call SetActorRotation

Jeff Stapleton
  • 183
  • 2
  • 8