Use a custom mouse inside the Ue4

Source: Internet
Author: User

Method 1: Draw with draw.

The blueprint for inheriting the HUD draws a custom pattern with draw material,draw texture and other screen-drawing methods that are suitable for drawing a simple mouse.

(If you don't need an offset, ignore the float-50 in the blueprint)

(Attached: node show Mouse cursor is true when the system mouse pointer is displayed during gameplay and allows the pointer to move outside of the game window.) )

There are not many strange problems with this method, but the disadvantage is that it will be blocked by UMG.

Method Two: Draw one in the UMG.

Take the anchor position to the upper left corner, and note the 0 component X and Y positions.

If you need to do a crosshair, you need to set the value of the alignment in the center of the component for the mouse position point.

Blueprint Reference.

If you use MousePosition, you also need to recalculate the relationship between the screen and the anchor position.

Bo Master Meng Xin 0w0! If there is any mistake, please correct me.

Use a custom mouse inside the Ue4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.