Announcement

Collapse
No announcement yet.

Attaching Equipment to Character Mesh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Attaching Equipment to Character Mesh

    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.
    My Works:
    Inventory and Equipment System | S.M.C (Simple Multiplayer Chat) | Spell/Ability System | Character Attribute Progression System

    Youtube | Website | Sellfy Page
    Fantasy 3rd-Person RPG , Skyland Of Arnythos

    #2
    Perhaps turn off physics on the mesh you're attaching?
    Last edited by n00854180t; 08-11-2014, 03:15 AM.
    Storyteller - An immersive VR audiobook player

    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

    Comment


      #3
      -.-, thank you , I was spending hours on this, trying everything from disabling gravity to disabling collision, disabling CCD, but i never tried turning off physics
      silly me, thanks again.
      My Works:
      Inventory and Equipment System | S.M.C (Simple Multiplayer Chat) | Spell/Ability System | Character Attribute Progression System

      Youtube | Website | Sellfy Page
      Fantasy 3rd-Person RPG , Skyland Of Arnythos

      Comment


        #4
        No problem Glad it worked for ya.
        Storyteller - An immersive VR audiobook player

        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

        Comment

        Working...
        X