DIFF.BLOG
New
Following
Discover
Jobs
More
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Sign up  
[UE4]Switch Weapon at run-time (AttachToComponent)
1
·
王爱国
·
Dec. 19, 2017, 10:55 a.m.
Summary
https://github.com/tomlooman/EpicSurvivalGameSeries/blob/4a6ee9a6081529fadbe0f693b2e4e6729d5ec08d/SurvivalGame/Source/SurvivalGame/Private/Items/SWeapon.cpp#L106 EpicSurvivalGameSeries\SurvivalGame\Source\SurvivalGame\Private\Items\SWeapon.cpp void ASWeapon::AttachMeshToPawn(EInventorySlot Slot) { if (MyPawn) { // Remove and hide DetachMeshFromPawn(); USkeletalMeshComponent* PawnMesh = MyPawn->GetMesh(); FName AttachPoint = MyPawn->GetInventoryAttachPoint(Slot); Mesh->SetHiddenInGame(false); Mes...
Read full post on dawnarc.com →
Submit
AUTHOR
RECENT POSTS FROM THE AUTHOR