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 Animation not working when deriving from C++ UserWidget

I am currently working on a UMG Task in Unreal and have built most of the UMG Classes in C++. Now I wanted to create a UMG Animation to animate the transform scale in and out. I created a Blueprint widget deriving my C++ class and used my custom Events "Show" and "Hide" to trigger an animation I created within that Blueprint. Now my problem is, the animation wont play. If I modify the transform values directly in defaults panel its working but when I try to get them changed by the animation nothing is working. I already tried passing the animations to the C++ class and play them using C++ but that didn't work too. The interesting thing is, I have another C++ deriving Blueprint Widget inside this Widget. When I try to animate the transform within this child, it is working, but not in its parent, although they are both C++ deriving blueprints.

I have added some screenshots to clarify my problem:

C++ deriving userWidget This is the C++ deriving User Widget in which the animations do not work.

Child C++ deriving UserWidget This is the Child widget that is inside the UserWidget from above. In here the animations are working.

anim Trigger on child This is how I trigger the animations on the child, and this works, but insead of here i want the animations on the parent.

anim trigger on widget This is what i want! But this animations do not work.

Product Version: UE 4.19
screen-1.png (125.4 kB)
screen-4.png (128.6 kB)
screen-2.png (114.5 kB)
screen-3.png (108.6 kB)
more ▼

asked Jul 19 '18 at 09:44 AM in C++ Programming

avatar image

68 2 7 13

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

1 answer: sort voted first

Ok I have found the problem... I have overwritten the function NativeTick and also called the parents function. But instead of calling Super::NativeTick I accidentally called Super::Tick thus calling the blueprint event two times instead of calling the classes default tick behaviour. I looked inside the source of the Super::NativeTick function and found that it calls the function TickActionsAndAnimation. And since I didn't call the correct parent function this was never called. (-‸ლ)

So remember: Always check if you really called the parents function if you overwrite a function in C++...

more ▼

answered Jul 19 '18 at 12:30 PM

avatar image

68 2 7 13

(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