Simulate collision physics on tank turret and gun?

So I have been working on making a physics based tank based on BoredEngineer’s plugin for a personal project, and I have run into an issue with the turret and gun. They are both static meshes that are attached to the hull so that they move with it and can rotate freely. The issue I have encountered is in trying to simulate collision physics on the gun and turret. I want them to act realistically, with the gun being unable to clip through things and pushing the turret around if it contacts a wall and the hull rotates.

I tried enabling collision on both the gun and turret, but what would happen is they would both still clip into walls and when they did the physics simulation would send the whole thing into space. I then tried to fully simulate physics, but I don’t know how to keep these meshes connected to their parent meshes while physics was enabled. What would happen is I would enable physics, run the simulation, and when I tried to rotate the turret the gun would fall through it (gun collision disabled with turret) and not follow its rotation. Is there a way to enable physics but keep the gun mesh connected to the turret mesh, so that when the turret rotated the gun followed it, and when the gun hit something, the turret rotated to follow its push?

Im having the same issue, does anyone know a solution for this?

Hello!
To do this you need to add one static mesh component what you will need to bind to the mouse (it will replicate aiming target for turret). Then bind your tank turret to this component with physics constraint and make sure you turned physics simulation for your real tank turret. You can change constraint properties as you want to make tank tower behave well… as you want.
Then do the same thing for gun if you will not be happy with the result of first few actions.
P.S. Sorry for my english if I made some grammatical errors.

Hi sigmarik,
Please could you help with a step by step way of getting my APC/tank turret to rotate?

I have a fully working vehicle but not sure how to start on the turret.

Thanks