Best way to move through animation frames using axis input?

Hello everyone. I don’t know if I’m wording my question correctly, but hopefully you all can follow me here.

I have a character driving a vehicle, and I have made two animations, one for spinning the wheel to the left, and one to the right. My idea is to use the default driving loop motion I made (where he’s just holding the wheel straight) and based off the right stick axis input, i want the wheel spin animations to play.
The problem is that I don’t want the animations to play slowly or blend around, I only want it so that if the axis is moved, for example, 30% into one side, it goes into 30% of the animation for that spin and stays there. Does it make sense?

Thanks in advance,

  • Mik2121

Check out my post here: Vanishing Point (Not the '97 remake!) - Film, TV & Animation - Unreal Engine Forums

I dont think it is easily achievable with axis input alone so you should consider using Timelines.

Yeah, i know. The part that benefits you is the usage of front wheel rotation. You can either use the wheel rotation to see how much the steering wheel should turn(using a Map Range node > get wheel rotation value > InA 0 > In B Max. wheel rotation you set in wheel BP > OutA 0 > OutB 1) But as i mention in that post this isnt accurate because of Ackerman Accuracy. So the easiest solution for you is to use a Timeline that plays a float track from 0 to 1 when you steer right, and another timeline with a float track from 0 to -1 when you steer left. Then feed those values to your animation.

Hey Jacky, thanks for the link.
I had a look at it and it seems to work for things like the actual wheel or similar stuff, but for the character’s hands I’m not sure I could get away with just rotating or moving the bones around.

Also if possible I would like to be able to do it just using blueprints instead of my actual character, as the character can also get on and off the car and I don’t want anything weird to happen (I’m not too well versed in blueprints and animation stuff, I’m an environment artist just trying to learn some stuff, so I’m trying to keep things as simple as possible so I can keep track of everything :P)

Thanks for the continued help, Jacky.

I think I’m following alright, but just in case I will explain what I’m doing. I decided to go with the second option as the wheel rotation stuff confused me slightly.

On my vehicle blueprint I have it set up so that my rotation axis sets a float, so then I can just use that float and not have connection wires everywhere.
I set it up like this:

However I don’t know how I could feed this into the actual animations just within my blueprint. Ideally I would like to not have to dig into my AnimGraph for my character.

Thanks for all the help,

  • Mik2121

Hello again. I tried this during my lunch break at work and it didn’t even work apparently. I player around with it and go this:

I don’t know if this is the optimal way to do it, but at least now I can move through both timelines. I’m still stuck here and not knowing how to use this and feed it into the animations though. Will keep searching, but if anyone can help me it would be appreciated. I don’t even know most of these nodes so I’m mostly searching for nodes and trying them out, hahah

Ok, here is something that should work. It requires one extra blendspace for your character and a bit of work in the anim BP but nothing too complicated.

  • Create a new Blendspace 1D for your driver with X Axis range of -1 to 1.
  • Place steer left animation to -1, idle to 0 and steer right to 1.
  • Go to your anim BP’s anim graph and get inside the Idle state of the locomotion.
  • Do this:

The first blendspace is your character’s normal walking, running, idling blendspace and the second one is for the vehicle. You’ll control their usage with that Bool, which you’ll set to true when you enter the vehicle.

  • Then in your character(or vehicle) BP do this:

It checks the axis value, if it is between 0.1 - -0.1 it pauses the timelines at the last frame. Otherwise it plays the timelines accordingly and sets the axis value to right or left. There are probably a couple of things i may have missed here but you should be able to get it working following this logic.

Thanks again for the help. I was busy yesterday and couldn’t try it out but today once I get home I’ll get at it. Thanks for all the help!