Attach to Actor does not render the attached actor
I'm currently using the ShooterGame project to implement a sticky bomb that would basically stick onto any character that it comes in contact with. I've managed to attach the bomb to a character as seen in the image below, but the bomb would not get rendered as soon as it get attached to the character.
This is the code snippet for attaching to the character.
I've confirmed that OtherComponent, OtherActor and the TraceResult.BoneName are valid data and not empty / null. I've considered the situation where the bomb would be hidden underneath the character's mesh since the bomb is not that big, so I've modified the SetActorLocation(...) code above to:
So basically I've gotten the extent of the grenade mesh in order to pull the grenade back out by the extent of the grenade, hoping that it will stick out from the character's mesh but that didnt seem to solve anything.
I was wondering if anyone's seen this behavior or can point out what I'm doing wrong with this. Thank you in advance!
asked Nov 11 '18 at 04:41 PM in C++ Programming
For anyone who stumbles across this post, the issue I was having was not the FAttachmentTransformRules I was passing into the AttachToActor / AttachToComponent function. I've initialized the enums to EAttachmentRule::KeepRelative but instead, initializing it to EAttachmentRule::KeepWorld solved the issue for me.
Follow this question
Once you sign in you will be able to subscribe for any updates here