How do i make a custom cursor to be on top of a UMG Widget?
Hello, i created a custom cursor using the Canvas on my GameHUD. I also create an UMG Widget, but to my surprise the Canvas layer is behind the UMG layer. How do i set that custom cursor to be on top?
asked Sep 30 '14 at 11:59 PM in Using UE4
Another way to create cursor, you can :
1.Create a new widget called Mouse Cursor(or anything else).
2.Put your cursor image into Root Canvas, define a size to it
3.Align image to center of canvas (Anchor ->Center, Pivot -> X=0.5 Y=0.5, Position= 0,0 )
4.Call "Create Widget" node & "Add To Viewport" node once in other BP such as HUD BP or Character BP when game start.
5.Don't forget to set ZOrder in AddToViewport node to a large number that always greater than your amount of widgets exist at same time.
6.Save this widget reference to a variable.
7.Set widget's position to mouse position use "Set Position In Viewport" in Event Tick.
You don't need to create cursor image in every widget. (Less work and easy to modify)
You can use HUD BP to set cursor position, apply HUD class to Game Mode so that you could assign custom cursor to specific level.
You have 2 options:
Follow this question
Once you sign in you will be able to subscribe for any updates here