Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Set_Attack no longer seems to account for Bullseye offset
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 Go to previous messageGo to previous message
danpaul88 is currently offline  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.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Mon, 19 May 2014 03:59]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Level Edit
Next Topic: nulling damage script?
Goto Forum:
  


Current Time: Mon Dec 23 12:15:38 MST 2024

Total time taken to generate the page: 0.01266 seconds