I’m basically just getting started with UE4. I’ve been fiddling around with it for about 2 weeks now trying to learn the user interface as well as what the engine has and how to implement it all.
So here is my question: How does one go about connecting content to a socket that is already physically attached to the skeletal mesh of the character?
For instance, using the Paragon: Wraith character mesh. The weapon is already attached to the character frame and has all of the socket info already setup.
So when I’m going through tutorials about adding a projectile, or other tid bits, I’m having a difficult time getting it to link up properly.
Most of the examples stem from using some other type of character models that you have to physically attach a weapon to, so everything they end up calling a reference to get socket location, it’s simple… however when I’m trying to get a socket location from the mesh on the character frame, I cannot get it to link up the right way.
Anybody have experience with this type of dilemma?
It depends on what you’re trying to attach. Sounds like you’re looking to spawn a particle projectile from the socket? You can use a Spawn Emitter Attached node. Simply link your character’s reference mesh to the Attach to Component input, and enter the socket name where it says "Attach Point Name. You’ll want to attach a preview asset to your character’s socket in the skeleton viewer so you can properly orient it if need be. To get it to fire depends on how you setup your code, but this is how I’ve pretty much handled magic casting projectiles with my characters. Good luck. =)
I managed to get a projectile attached to the skeletal mesh socket of the muzzle. (see attached pic)
What I’m trying to do is add a muzzle flash effect, but the example I’m following doesn’t use the SpawnActor Projectile Base function, so I cannot get a reference to the skeletal mesh to get the socket location from the mesh and then return it to where it needs to be implemented.
For example: (see attached pic)
From the Spawn Projectile Base widget, he casts to ThirdPersonCharacter then As Third Person Character he drags out to Weapon_Attached (his skeletal mesh of the weapon he created). From there he gets a reference to target skeletal mesh then Get Socket Location. The return value from Get Socket Location is them directed to the Location input of Spawn Emitter at Location.
This is the part that I cannot figure out. Obviously I didn’t create the Weapon_Attach BP because I’m using the Paragon mesh that already has the weapon attached to the skeletal mesh of the character.
So, how do I get an Emitter to reference the socket location of the skeletal mesh of the Paragon character’s pre-built weapon?
I’ve tried a few other ‘tweaks’ to try and get this to be a bit more feasible, but still no solutions.
I’m sure that UE4 has some function call that can reference the skeletal mesh of the inherent weapon attached to it… I just cannot seem to find it nor any examples of it on the internet.
So far I still cannot find a way to get the emitter to connect to a socket without it being external to the original mesh for some reason.