I have a very odd problem, When i attach a newly spawned object to my characters mesh socket, it seems to disappear and after few seconds fall from the sky.
not sure if its revelant but, im using character from Mixamo Animation Pack, and i have created a copy of the Mixamo character skeleton and added a custom socket to the skeleton, also my item system is such that when an item is looted, i destroy the mesh component, and add the item to the players inventory, when i equip item i call my “drop item” function which spawns a new instance of the blueprint which defines my item, then i attempt to attach the static mesh component of this new item to my characters mesh.
//DropItem returns pointer to a newly spawned item,
EquipmentSlots[SlotName] = Item->DropItem(this->GetActorLocation());
EquipmentSlots[SlotName]->StaticMeshComponent->AttachTo(Mesh, FName(*SlotName), EAttachLocation::SnapToTarget);
I have also tried to attach the item via blueprint on event begin play, but the mesh of the attached item seems to disappear, interestingly enough i was able to attach the characters mesh to the item and that worked fine (in which case the character just fell to the ground)
Any help regarding this would be greatly appreciated , if there are any questions just ask and I’ll answer as best as I can.
Glad it worked for ya.