I’ve been asked a couple of times to explain how to handle the steering wheel and speed/rpm gauges animations so i’m posting the process here to make it easier for whoever else is interested.
First off, rig the parts you want to animate in your modeling software. If you are a 3ds Max user you dont need to bother with bones and skinning;
RPM gauge example: Create a dummy helper and set it’s location and rotation the same as rpm needle’s. The dashboard is going to be the static part/the root bone, so set it’s pivot point at 0,0,0. Finally Link the needle using the link tool to the dummy and link the dummy to the dashboard. This linkage will turn into bone hierarchy when you import it into the editor. Export without any animation.
Now in the editor, create a Blueprint Interface in the content browser. In that interface create a function and the variables you are going to transfer between the vehicle BP and the gauges/steering wheel’s anim BP. It will look something like this:
To implement this interface open up your vehicle BP and the gauges/steering wheel’s anim BP > go to Class Settings and add the BP interface in Interfaces section.
In Event Graph of the anim BP call the event of the function you created in the interface, then create and set variables for each of our parameters.
Head to Anim Graph and set this up:
Select each Transform(Modify) Bone node and enter the name of the bone you want to animate, and also dont forget to set Rotation Mode to Additive and Rotation Space to Bone Space. Rotator from Axis and Angle nodes make the bones rotate along the axis you like. In this case it is the Z axis so Z is set to 1 for each of them.
Finally we head back to the vehicle BP to calculate and send those variables, which in the end should look like this:
The variable named Gauges is my skeletal mesh that includes the dashboard, gauges and steering wheel. Call the function we created earlier and then call it from the gauges’ anim BP as well and plug it to the function’s target so that the interface sends the variables to the correct BP. To calculate the RPM get the rotation speed from vehicle movement component. The value i am multiplying it with is this; Angle between 0 and 8 on rpm gauge / Max. RPM value. You can easily find out the angle on photoshop or your modeling software - OR - instead of multiplying you can use a Map Range node(Plug rotation speed to Value input, In Range A=0, In Range B=8000, Out Range A=0, Out Range B=max angle.) Then plug it to rpm input of the function. The same logic applies to speed as well.
For steering wheel i get one of the front wheels, of which steer angle is set as 40 in front wheel BP, then multiply it with the value that rotates the steering wheel to your satisfaction; so if i multiply it by 9 the steering wheel is supposed to rotate 360 degrees - BUT - this doesnt work realistically because of Ackermann Accuracy. It is set to 1 by default, and you should normally leave it at 1, so this wont work unless you dont need Ackermann accuracy in your vehicle setup. So, instead of using the wheel angle you can use Timelines that play whenever you hit A and D. To find out how long the curve of a timeline should be you can use the Steering Input Rate you set in vehicle movement component. If you set the rise rate to 1 it means the wheels rotate in 1 second. If you set it to 2, half a second; set it to 0.5, two seconds; etc.
And thats about it i guess. For more visual aid check out this video i had posted a while back. Let me know if you have any questions!