Vehicle with Turret (Correct Method in Blueprints?)


As the post title states, my question is about the correct method to set up a vehicle that has a rotating turret (rotating only on Yaw) using blueprints.

Currently I have a (somewhat) working version of what I’m after using the setup shown below:


I have several static meshes put together in a blueprint. At the moment I can move the vehicle around, and the ‘turret’ will follow the direction of the camera. I have physics enabled on the Root mesh (“HarvesterHull_v001”) which allows it to traverse inclining slopes etc.
The problem with this: While the Root mesh will change rotation to match slopes the ‘turret’ will not, and it will remain at zero for pitch and roll as shown in the image below:


Is there a way to solve that issue using my current method?

I thought about using a Skeletal Mesh with a bone that is skinned to just the ‘turret’ of the model and rotate the bone, but I’m not sure if that’s a good method.

Essentially: All I am asking is whether I am currently using a good method to produce a vehicle with a rotating turret. If I am not, could anyone provide some light on a better/correct method?

All the best, Inject4.

this should halp:

I’ve watched that video in its entirety before and he seems to just skip straight over the part where he sets up the tank to have physics (moving over terrain correctly).

That’s why I asked here. Unless of course I missed something, but I swear I’ve scoured that video to no avail.

You’ve mentioned that you rotate turret in blueprint, how exactly you are doing it? Turret should inherit the movement of the parent, so if you want to rotate it - use only AddLocalRotation() instead of changing it’s transform completely or setting angles explicitly.

That’s it! I got so caught up thinking that there was something more complex I was missing that I didn’t think to look at how I was rotating it! I should be able to figure out the rest now, but thank you so much. :slight_smile: