[4.6.1] Attached Actor not binding to socket location

So, I am working on an inventory system, and I am running into some weirdness. I am not sure if it is a bug or something on my end (I am almost certain it is my fault, but worth checking in)

I have a shield actor, with a list of sockets that it can be attached to, and I have a player character with sockets. At run time, I toss all of those sockets into in array, and then check to see if character has a socket that matches name of socket for shield. If it does, it attempts to attach shield to player socket. And that is where things start to go wrong.

Problem 1: shield snaps to player, but it does not go to right location on player mesh. target socket is on hand, and it snaps to crotch. (maybe it swings that way… I dunno)

26994-lovetheshield.png

You can’t really tell in this picture, but character actually being pushed into corner by shield.

Problem 2: Once shield is attached, it begins pushing my player around map, and completely prevents player from moving.

Problem 3: shield does not match animation of bone it is attached to.

Cheers guys,

Update: I found one bug, where enums were passing wrong value, and got that fixed. I found another where my array was going out of bounds. I fixed both of those, however, same end result is still happening. names match, object is still being bound at wrong location, and still pushing player around.

Hey ,

Do you still have these problems if you remove collision from shield?

Actually, I set collision type to ragdoll and everything works just fine as far as my character being able to run around. Changing from an “Attach Actor to Actor” node to an “Attach Actor to Component” node fixed socket snapping issue. Still, there were some interesting behaviors worth investigating.

a) If player was colliding with shield and not moving, why was it being pushed backwards? Does player actually recoil a bit on collision?

b) Why should Actor to Actor be different than Actor to Component if both of them allow snapping to a socket?

So in short, I have it fixed and working now. I’ll leave it up to you as to whether you want to keep this open for troubleshooting or not. :slight_smile:

Thanks for quick response, . Apparently, dirty language filter has a problem with anatomically and socially correct terminology as well. LOL It had me moderated when I posted, and I suspect it is because I named location where sword was snapping to. Good thing I didn’t post screen shot of it. :stuck_out_tongue:

Cheers,

Hah, yea, it caught you on that one. I just went ahead and published it. No idea why that’s in our filter =)

I’ll keep this open for now, because I’d like answers to those questions myself. I had noticed an attached mesh pushing my character up in air other day, not sure why it should do that. I’ll ask devs about these and let you know when they get back to me. Glad you got it working, though!

Yup, shield was doing same to my character when it was snapping to its feet. Was really weird. Also, I had posted up another question/recommendation here: Is there a way to sort/organize/tag mesh sockets? - Blueprint - Epic Developer Community Forums

I managed to get around this, but it was a bit weird. Had to pull all sockets into an array, and then iterate through checking a supplied name against socket names. Then had to turn around and create an additional array just to keep track of which sockets had something attached. That seems crazy inefficient, not to mention having a huge potential for introducing bugs, particularly if it has to happen for multiple characters and often. While they are looking into what is going one with socket snapping, maybe they could give them some tags and a way to check if anything is bound to them :stuck_out_tongue:

Cheers,

, Just wanted to update on this, because we are still seeing strange things. What we are seen now is that code that works perfectly on MyCharacter does not work if a different mesh is used, even if all sockets have same names. Literally ONLY difference between these two is mesh/skeleton that is being used. I used dual wielding shields in pic reference because they are easier to see:

I’m not sure what’s happening here, but I can’t really see all of what’s going on. If you want to upload project somewhere like Dropbox and send me a download link, I can take a look at it for you and see if I can figure it out.

Hehe you still have SVN access :stuck_out_tongue:

Hah, derp moment there. Okay, I’ll grab it and look at it today.

Any chance of an update on this? I suspect we’re seeing same behaviour over there.

Thanks!

Hi ambershee and RAVaught,

We’re still looking into this and trying to find root cause. I apologize for delay, but I’ll keep you informed of our progress. Thanks for your patience!

Hi ,

I looked into project again today, and it looks like everything is working fine. only issue I saw was that when I used Vampire skeletal mesh, socket needs some re-positioning. Is there another error you’re seeing?

Nope. We got it all working with 4.7, so I will close this question. Sorry for delay in response, things have been hella crazy here.

Totally fine, I’m glad it’s working for you. Thanks for letting us know!