x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Setting a widget inside a main HUD to mouse position

Hi,

I'm trying to make a tooltip appear at the mouse position. When I add the widget directly to the viewport the set position in viewport is working, the tooltip appears at my mouse position. But I want to set the ZOrder of the widget so it appears above my inventory screen. So I tried adding the Tooltip Widget to my main HUD blueprint along with all the main HUD panels like inventory, skill book, character panels. Now I'm trying to "Set Position in Viewport" on the child widget (item Tooltip) inside the main HUD. But the "Set position in viewport" is not working on the child widget.

When I set the "set position in viewport" on the entire HUD, it works, the entire HUD is following my mouse position.

Why does "Set position in viewport" only work on the entire widget blueprint, and not on added child widgets?

So in short, when I don't add the Tooltip widget to the main HUD and add it to the viewport seperately from the hud, the mouse position is working, but the tooltip appears underneath the inventory panel.

When I add it to the main HUD, the set position in viewport is not working and the tooltip appears at the position where it's positioned in the HUD Designer tab.

alt text

alt text

Product Version: UE 4.13
Tags:
more ▼

asked Oct 08 '16 at 12:22 PM in Blueprint Scripting

avatar image

Rebel Camp Games
20 4 7 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I found a solution. It is not possible to set Z-order between different widgets. i.e. between my main HUD widget blueprint and my ItemTooltip widget blueprint. But you can make sure that the one that needs to appear on top of the other one is added lastly to the viewport with "Add to viewport". Since my itemTooltip is added to viewport in a different blueprint it was being added to the viewport at the same time, because both are in OnBeginPlay. I ended up adding a "Delay" node set at 0.01s before adding the ItemTooltip to the viewport to make sure it is added after the HUD. Now the tooltip appears on top of my HUD panels. :)

more ▼

answered Nov 09 '16 at 06:14 PM

avatar image

Rebel Camp Games
20 4 7 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question