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"

UMG custom hit box on a button or image


Is there any way to make a custom hit box on a button, or other Widget control?

I have an image of a button that has the following shape
alt text

And I'd like the hitbox to be exactly the shape of the image, not a rectangle. Is this feasibile?


Product Version: UE 4.10
more ▼

asked Apr 07 '16 at 03:07 PM in Blueprint Scripting

avatar image

149 31 33 41

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

2 answers: sort voted first

Try using this: https://www.youtube.com/watch?v=yxdP_NaFlzs download link is in description to the video.

more ▼

answered Sep 27 '16 at 11:23 PM

avatar image

89 3 4 9

avatar image numsi550 Sep 30 '16 at 07:49 PM

Thank you very much! I didn't think that anyone would answer this after all this time :)

avatar image Ovodus Oct 01 '16 at 09:19 AM

I've found a bug there. Haven't solved it yet. For it's been working correctly, try to keep button's size and hit box image size equal. And set button's size manually.

avatar image Justin.Grant Dec 29 '16 at 08:43 PM

I found a fix for that bug you mentioned. All you need to do is change the BufferPosition calculation to floor the LocalPosition.Y value. The decimal point has no meaning in texture coordinates and it's giving you the wrong pixel. So it should look like this:

 int BufferPosition = (floor(LocalPosition.Y) * ImageWidth) + LocalPosition.X;

With this fix you can have a button size that doesn't match the texture size.

avatar image Skjdljr Dec 02 '18 at 02:10 PM

Anyone else having compiler erroa when trying to use in version 4.20 of ue4?

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

Any one else having issues getting this to work with 4.20. I am getting a bunch of linker errors

more ▼

answered Dec 02 '18 at 01:59 PM

avatar image

16 1 2 3

(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