Jump to content

3ds max - character and weapon


Recommended Posts

You could always just treat that specific NPC like a PC through ::SetRace in ActorInstanceData(register all the body parts) and add the part like it's attaching an actual weapon to the model.
Here's how I did it:

Spoiler
case NRaceData::ATTACHING_DATA_TYPE_WEAPON:
			{
				CGraphicThing * m_pModelThing = (CGraphicThing *)CResourceManager::Instance().GetResourcePointer(c_pAttachingData->pWeaponData->strFileName.c_str());
				
				RegisterModelThing(CRaceData::PART_WEAPON, m_pModelThing);
				SetModelInstance(CRaceData::PART_WEAPON, CRaceData::PART_WEAPON, 0);
				AttachModelInstance(CRaceData::PART_MAIN, c_pAttachingData->strAttachingBoneName.c_str(), CRaceData::PART_WEAPON);
				break;
			}

 

 

  • Love 1
Link to comment
Share on other sites

  • Active+ Member
10 hours ago, boaspessoal said:

You could always just treat that specific NPC like a PC through ::SetRace in ActorInstanceData(register all the body parts) and add the part like it's attaching an actual weapon to the model.
Here's how I did it:

  Hide contents
case NRaceData::ATTACHING_DATA_TYPE_WEAPON:
			{
				CGraphicThing * m_pModelThing = (CGraphicThing *)CResourceManager::Instance().GetResourcePointer(c_pAttachingData->pWeaponData->strFileName.c_str());
				
				RegisterModelThing(CRaceData::PART_WEAPON, m_pModelThing);
				SetModelInstance(CRaceData::PART_WEAPON, CRaceData::PART_WEAPON, 0);
				AttachModelInstance(CRaceData::PART_MAIN, c_pAttachingData->strAttachingBoneName.c_str(), CRaceData::PART_WEAPON);
				break;
			}

 

 

Thank you very much bro. Does it work like this?
And where exactly do I need to add this?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.