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.
when it attacks, the launch effect plays from under ground but rotated toward the target
You described 2 different things. The first one is about attaching a turret model, the second one is about attaching action actor launch effects.
But since they both work wrong, I can assume, that the problem is within the model. You probably attached turretZ to a wrong bone. Try to make an addition to a bone like this:
<-------------><->
And attach turretZ to that short little bone. Because if you attach it to the long one, it will not appeat at the tip of the bone, but at its origin, at "x" point of this:
<x-------------><y->
, so attach turretZ to the short bone, so it will be at "y" point.
If this assumption is wrong, just check actors' site operations.
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.
now the effect, which plays at the weapon attach point on the turret, is firing at the proper place and rotation
Looks like now you attached turret Z right, so, model is ok. And all you need is to attach the turret model in a proper way. How do you do this? Using Model actor? Having events like this?
unit birth.tank
create
unit death.tank
destroy
Have tank actor in the Host field? Have "attach turretZ" in the site operations field? Turret's model scale is ok? Maybe try to increase its scale to see if the model's somwhere around tank?
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.
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.
You described 2 different things. The first one is about attaching a turret model, the second one is about attaching action actor launch effects.
But since they both work wrong, I can assume, that the problem is within the model. You probably attached turretZ to a wrong bone. Try to make an addition to a bone like this:
<-------------><->
And attach turretZ to that short little bone. Because if you attach it to the long one, it will not appeat at the tip of the bone, but at its origin, at "x" point of this:
, so attach turretZ to the short bone, so it will be at "y" point.
If this assumption is wrong, just check actors' site operations.
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.
Looks like now you attached turret Z right, so, model is ok. And all you need is to attach the turret model in a proper way. How do you do this? Using Model actor? Having events like this?
unit birth.tank
create
unit death.tank
destroy
Have tank actor in the Host field? Have "attach turretZ" in the site operations field? Turret's model scale is ok? Maybe try to increase its scale to see if the model's somwhere around tank?
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?
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.
@Zolden: Go
I did. The bone is parented to the Ref_TurretZ, and I'm still having these weird problems. Want me to email you the model or something?
Here is the model in game and in the galaxy editor.
Edit: I attached the meshes, and I'm still having the same problem. I hate this :(
I guess I'll just try using 2 models...
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?
@composure19d: Go
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.
Dude, I'm doing it and it's still dropping to the center. Can you upload that model to me so I can see what I'm doing differently?
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.
Did you do this by scaling? I didn't know bones even had any height and width. I'm kind of new to this :/
Are you talking about the fields in the modify tab under "Bone Parameters" and "Bone Object"?
And thank you very much for helping me! You are very knowledgeable.
Yeah, it's bone parameters. When you click a bone to create, you see them. Or when you go to bone tools (animation menu if i'm not mistaken).