I have a custom model with a turret. I added the Ref_TurretZ and linked it to all the turret bones.
However, when I give the unit a turret, it disappears. I placed it on the map and the turret is there in the editor, but in-game the entire turret just disappears (was it just dropped into the ground?). I tried setting the opacity to .5 and I don't see it in the ground. Any idea what the problem is?
I think the turret is just going below ground for some reason, because when it attacks, the launch effect plays from under ground but rotated toward the target.
Okay it still isn't working. I did that, and now the effect, which plays at the weapon attach point on the turret, is firing at the proper place and rotation, but the turret is still gone. This is so confusing.
Do I attach the turret bones to the base/root? Or do they just float up there?
Attached a picture. The selected ref is the turretz, as you can see.
All I have is a special turret actor, which is an exact copy pretty much of the Colonist Transport turret. I don't have anything in the host fields or site operations or whatever. The actor is pretty much an exact copy of the Colonist Transport. And the turret and the tank model are together (the turret is not a separate model).
Is it a problem with the mesh? Do I need to add the TurretZ reference to the skin modifier or something? I don't see how the Colonist Transport can function correctly and mine doesn't in any other reason but my model.
The turret and the tank body are separate objects, too (not sure what to call it). Do I need to attach them?
Edit: Okay I have another problem, now. I try to add bones to the mesh, I export, but then when I import the skin modifier is still the same (the bones were not added). What the heck am I doing wrong?
the turret and the tank model are together (the turret is not a separate model).
Ok, then you need to attach a bone to the TurretZ attachment point and skin the model's turret with that bone, so it will rotate like siege tank's turret. And you won't need any special turret actor for this, just add any turret in the unit's weapon field along with the weapon.
So now I just made 2 models, one for the turret and one for the hull. The only problem now is that the attack launch is above the model for some reason, rather than being attached to the turret weapon. I made a new site, with the host being the turret model addition and with SOpAttachWeapon as the site operation. Any idea why it's not attaching to the turret's weapon reference?
As I understand, you use the Action type actor to visualize attack animations. It has a field like "local operations at launch point". You need to have SOpAttachWeapon there. And also you need to have a Local Offset actor there. In the "offset" field of this second atcor you need to define the offset: -y means forward, x means left (or right), and z means up. So, just configure it to pull your launch animation to the gun. It's above now, so u'll need some little -z offset i guess.
But I want to say, that you still could try to manage to skin your turret with a turret bone, so it would be rotated without all these escessive things like cutting your model into two, attaching the turret, using site operations to place turret and animations. It may consume some time for experiments, but it could save more time if you plan to use alot of models with turrets.
Yes I know, I want to use the 1-model version, but it's so messed up and I don't know why at all. The turret mesh is properly weighted and skinned to a turret bone, which is parented to the TurretZ reference. I still have no freaking clue why on earth it's just dropping to the ground, though. Shit is getting mad annoying and I've been spending days on it that could be spent working on other things.
Attached the 1-model version if you can tell me what is wrong with it.
I did what I described in my first post in this thread, and it fixed the turret. Looks like you forgot abouit little bone and TurretZ been falling to the origin poin of your bone which was inside the tank;s body.
So, what you need to do. There is a bone named bone_turretdummy. I created another little bone from that bone. Aligned its orientation to the TurretZ point. And attached the point to this new bone.
I also had to increase bones' height and width parameters. There were zeroes as height and width, so bones were looking as lines and visually they had little bones at their tips. But it was fake little bones, they were just to mark bones' ends. So I made a good fat tangible bone, clicked that bone_turretdummy and continued it with another bone.