animation - Unreal 4 C++ Actor Movement -


i have data actors movement being read in file @ start of game. data gets read in contains vector positions actor should move next. have actor moving position position no problem... until start add animation skeletal mesh attached actor.

my problem: how can found out velocity work out animation play idle, walk, jog , running? doesnt have velocity lerping position:

setactorlocation(fmath::lerp(getactorlocation(), newpos, 0.01));

any thoughts on how set right animation based on distance travel , speed?

should move actors movement character can use addmovementinput velocity. then, if go down route, how say:

move character current position, next position in x amount of time giving character correct velocity use in animation selection.

can normalize difference between 2 vector lengths (getworldlocation) , use abs(floating point) result x variable put 1d blend space idle, walk, jog, run in animation bp? sure account "acceptance radius" or else once gets location won't quite , keep turning quickly.

not sure why you're lerping vector vector. would've used (movetoactor or movetolocation):

amypawn->movetoactor(amyactor, 90.f,true,true,false,0,true); 

so cleaner! movetolocation, using bt/bb.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -