Animation blueprint - trying to find when AI changes direction.

Hi all,

I normally search Google, UE4 answerhub and on these forums for my answers, but, this one is not as obvious as I would have hoped.

I have posted my question on the UE4 answerhub, but, I don’t think it is going to get much recognition (5 views in 6 hours and no comments).

So, I am hoping that the wonderful and talented people on here could help?

I am currently making a side scrolling game and I have an enemy AI character and have a few animations that I would like to play at certain points of the anim graph. When the AI needs to change direction, I want to play an animation, then allow it to change direction. As it is a side scroller, everything is moving along the Y axis only, so, I thought this would make it easier?!

The enemy AI is a worm type of character and instead of just rotating on the Z axis (yaw), I have an animation that means it burrows in to the ground and pops back out again, facing the right direction.

so, to clarify, this is the transition rule to allow one state from the anim graph to move onto the next.

I have tried and tried. Some of what I have tried, I was certain would work! But, stil to no avail. I managed to get the animation to fire, but, then it wouldn’t stop firing, which looked weird.


This is what I thought would actually work, but, it doesn’t!

I really hope someone can help with this.

Thanks in advance.

Cheers

Jay.

Fallen off the front page already. WOW! lots of questions on here.

Just bumping the thread, I am really struggling with this.

If you are looking at this thread with the intention of answering it, please don’t waste your time. I have already solved the issue and everything is working as it should now.

Cheers

Jay.

You would have to find the worms delta location is real world space.
For example, if it is going up, then it’s adding to it’s world location on the z (z=1, z=2) and subtracts when going down.

I’m not sure if UE4 has a node for that, but you could piece it together if you understand vector math.
Vector google search

I wish they had a AI forum for us. AI is not a game. lol.

Thanks for the answer, I appreciate you taking the time to help.

I have already solved the issue I was having. It was actually simpler than I initially thought.

Cheers

Jay.