Download

Attach actor to skeletal mesh without socket?

Is there a way to attach an actor to a skeletal mesh without using sockets like you would do if you throw a snowball on a characters mesh and snap the snowball relative to the next bone where it hits the character? I like sockets to attach some weapon but a snowball like projectile could hit the character everywhere so one predefined position does not work.

I doubt that works, but you could make more sockets, one for each main part, (Upper body, lower body, upper arm, lower arm, upper leg, lower leg, head)
And then just attach the projectile to the closest socket on hit. (As a very rough idea).
What im not sure about is how to orient it correctly in the trajectory direction. I guess you have to model your projectiles facing all a certain axis, and then you can set rotation of the socket at the event itself by using the rotator of the projectile.

What you probably want to do is just use decals and place it at the hit location.

Answer to myself (just in case somebody else would do this): It is possible to use a bone name as socket. So it is pretty easy …finally. All I have to do is to “AttachActorToComponent”. I get what I need already from my BreakHitResult of the OnComponentHitEvent. “InParent” of my “AttachActorToComponent” is the “HitComponent” (which could be a skeletal mesh) and “InSocketName” is the “HitBoneName” (which is actually no socket but works). I use KeepWorldPosition as the AttachLocationType and the Target is some actor (e.g. smoke, snowball, …).