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"

How Get Current Time for AnimMontage ?

hello, i need your help because i know nothing about c++. (i just want to get the current time of anim montage) Last time i searched a soluce for get "current time" for my anim montage and i found this :


So i followed, (i tried to understand but i can't, so i just copy paste and that doesn't work) I'll illustrat what i did with 2 pictures. alt text alt text

Thx for any help (sorry for bad english).

Product Version: UE 4.20
c-00.png (191.4 kB)
c-01.png (183.5 kB)
more ▼

asked Dec 18 '18 at 07:03 PM in C++ Programming

avatar image

1 1 1

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

1 answer: sort voted first


You should not Change the Character.cpp itself, you should create a custom character class derived from ACharacter (Character.h)

Inside your custom character (let's call it MyCharacter) You can do something like this in any function where you want to get the position:

     UMyAnimInstace* AnimInst = Cast<UMyAnimInstance>(GetMesh()->GetAnimInstance());
     if (AnimInst != NULL)
         float Position = AnimInst->Montage_GetPosition(MyMontage);

~ Dennis Andersson

more ▼

answered Dec 19 '18 at 03:38 PM

avatar image

266 4 5 6

avatar image Antìvírus Dec 20 '18 at 07:38 PM

Hello, thx for your help, but that doesn't work, i think i know why but how do ? i'll try to find a good c++ tutorial for learn c++ and i'll see if that work. alt text

c-02.png (135.7 kB)
(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