Page MenuHomeFeedback Tracker

Dead bodies are hard to loot | (VicinityItemManager > ExcludeFromContainer_Phase1) behaviour is undesired
New, NormalPublic


When looting a dead body, the player must be looking at the object center of the dead body.
The Object center is at the feet when the death animation is played.
This causes players to be unable to loot dead bodies when looking at the actual body.

VicinityItemManager > ExcludeFromContainer_Phase1 uses the following code to check the body direction from the player

			vector entity_direction = player.GetPosition() - entity_ai.GetPosition();


To fix this, use the pelvis position instead (like in IsObstructed()

				int bone_index_player = vicinity_player.GetBoneIndexByName( "Pelvis" );
				object_center_pos = vicinity_player.GetBonePositionWS( bone_index_player );


This would allow players to loot bodies by looking at the pelvis position, rather than the object position (which is different from the pelvis because of the death animation)


Operating System
Windows 10 x64
Steps To Reproduce
  1. try to loot dead body by looking at the center of it

  1. Inventory container of the dead body will not appear

  1. Look at the object center of the dead body

  1. Player can now loot the dead body

It's more natural and makes more sense for players to loot a body when looking at it's center(pelvis), not the feet.

Additional Information

Could also be useful to just allow players to loot the body when the player is close enough to the dead body and override the cone check.
But still use the pelvis as the center.

Event Timeline