Re: Set_Attack no longer seems to account for Bullseye offset [message #487640 is a reply to message #487630] |
Mon, 19 May 2014 03:53 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma:
|
General (5 Stars) |
|
|
Vector3 SoldierGameObj::Get_Bullseye_Position()
{
if (Vehicle)
return Vehicle->Get_Bullseye_Position();
RenderObjClass* model = Peek_Physical_Object()->Peek_Model();
int boneIndex = model->Get_Bone_Index("target");
if (boneIndex > 0)
return model->Get_Bone_Transform(boneIndex).Get_Translation();
boneIndex = model->Get_Bone_Index("C SPINE1");
if (boneIndex > 0)
return model->Get_Bone_Transform(boneIndex).Get_Translation();
return model->Get_Position();
}
You are correct in that it doesn't seem to make use of the Z offset in the preset definition, unlike the stock code which does appear to use it and even has a special case for Is_Crouched(). You'd have to ask jonwil why we no longer use the bullseye Z offset for that, although my guess is that it was assumed all infantry had a C_SPINE1 bone to aim at (this is roughly in the middle of the chest of all standard rigs)
Jerad Gray wrote on Mon, 19 May 2014 00:23 | you have to reexport about ~500 animations a piece with each skeleton).
|
You can cut down the number of skeletons you need to export by only exporting one weapon pose set since it sounds like most of those won't be holding weapons anyway. Also I wasn't aware anyone had actually gone to the effort of making fully functioning skeleton sets in W3D, the reason BHP has never implemented dog units is because the skeleton animation sets are poorly documented and it's always considered to be too much work for a single unit to create all the animations.
Not that I'm suggesting you should do this, just pointing out that for future skeletons you can reduce the amount of effort required.
[Updated on: Mon, 19 May 2014 03:59] Report message to a moderator
|
|
|