Display heading in HUD

Hi, geekyhawkes,

  1. get actor rotation, the yaw value from rotation is actually the heading value you want.
  2. you can bind the yaw value to your umg control or Draw heading flag in HUD::DrawHUD function.
  3. on players Tick event to update the yaw value, and umg control or HUD will auto update

steps:

  1. add a float variable called heading in character bp class.
  2. add Tick event in character eventgraph, and get actor rotation >> break rotator >> set z value to heading variable.
  3. create a umg user widget, add a text(TextBlock in older version), create bind on text property in content category. get player actor >> cast to projectcharacter type >> set heading value to return value.

if you want to do more custom display than a text show heading number value eg. compass, just do it, you get the heading value in widget now.

cheers.
omega
.