There was a problem with the implementation of the tank, I have two skeletal meshes - turrets and hulls, I made a transport using the skeletal mesh of the hull and I need to make a tower from the skeleton mesh of the turret but I don’t known, how to do this, in to guides uses static meshes or a single skeletal mesh . Please tell me how to implement such a concept, maybe someone has already done this? Thank you in advance.
Utilize the use of blueprint actor classes. It can be a pawn, a character or a blueprint actor.
Inside this class, you can then add your meshes by using the components.
Can you give an example of such a scheme?
If I’m reading everything correctly, you’ll need to create an socket for the turret (and probably create an groove in the hull to avoid some clipping), attach the turret to the socket, add in some clamps so that it’ll only rotate horizontally.
As for the main cannon; realistically, it’s normally the same as the above, except that you only want it to move vertically
Hi there @Gurkdaten, hope you’re well!
This topic has been moved from International to Programming & Scripting: Blueprint.
When posting, please review the categories to ensure your topic is posted in the most relevant space.
Thanks and happy developing!
It’s not just that. We need to get the rotation of the turret along one axis at a given speed, while the gun is part of the skeleton of the entire turret (implemented through animation blueprint). I tried 2 implementations of rotation: rotation behind the target with check (1, 0, -1 or left straight and right) and branches, AND a scheme to call the trace of the line and rotate along its vector. In the first case, there is a sharp transition from 0 to 360 degrees, at the intersection of which the turret turns in the other direction, in the second case, the turret always remains horizontal when attached to the vehicle.
First:
Second:
You can create an invisible component attaches to the far front camera and do a look at the rotation for the turret. So, the turret will always follow the camera rotation.
For the hull, I think you know how to do it already.