Download

"Move Component To" via relatives to camera?

I’m trying to get my root mesh bone to move from point A to point B in a forward direction via an animation, ie. Front Roll.

I’ve tried enabling “EnableRootMotion” while actually having the animation move forward, yet it didn’t work. It would come back to its original point.

Are there any commands such as “Move Component To” to get this to work properly?

What I was thinking is getting the relative camera vector value and adding to that, I just don’t know how to carry that out. Help?

You have to set “EnableRootMotion” on your animation. But you also have to tell your AnimBlueprint state machine to consume this root motion. By default you will need to run your root motion animation in a montage slot from AnimBlueprint for it to move the capsule.

You can also set anim blueprint class default settings to “Root motion from everything” to directly use root motion from animations in your animgraph.

Not sure how to use Animation Montage in Machine States, yet I got it working by enabling the “Root motion from everything” in the Animation Preview Editor! Thanks a lot! Keeping up with this GUI is a task in itself.

I have another question regarding this problem, is there anyway to move an actor/mesh without having to worry about the animation root? Let’s say, for an animation that stays in the same Axis?

Don’t use root motion, use an inplace animations only. You can then directly control the capsule from your game thread and the animblueprint can query for movement or can be sent signals to display the appropriate animations.

Using root motion animations complicates everything and I wouldn’t recommend you start with those unless you already have some experience with the engine.

How do I work with the capsule in the “game thread”? Sorry, i’m just learning.

I meant you can the tick() function in your character blueprint to move your character’s root component by directly setting it’s location in the world with SetActorLocation() or you can setup a timer to call that function. That is all you need for simple back and forth.

For more advanced movement if your character is a bot possessed by an AIController you can use it’s functionality to get pathfinding and move around obstacles etc.

I will try incorporating the “SetActorLoctation()” next time i’m working on the animation. Thanks ALOT!