2D Socket Location

In my 2D Blueprints Project, I add Sockets in Sprite Frames and made Character Flipbooks.
However, ReturnValue of DoesSocketExist Node shows False whether I run it in engine or launch packaged game.

I actually could get correct world-space location when I run game in engine, but when project was launch or packaged, ReturnValue of GetSocketLocation Node issue appears as below (text in yellow):

26360-image+003.jpg

If break vector to float, value was 0.0

I wonder if this is a bug come with current version (4.6.1 and 4.7Pre3) or something wrong with my Blueprints?

Hey Pseudor,

Thanks for report! I was able to reproduce issue with DoesSocketExist, and I have submitted a bug report for developers to look over (UE-7642). I will let you know when I see any update on that.

I was not able to reproduce behavior you described with GetSocketLocation, however. Can you post a screenshot of your BP setup for that? Thanks!

Set up sockets in Sprite Frames

and use Sockets in BPs

It’s strange that I can get correct location values in a new project, but can not in my current project. My current project was created in 4.6.0

If it’s a project-specific issue, it may be that you need to refresh nodes. Select all of nodes in that BP, right-click, and select Refresh Nodes. Then Compile and see if that fixes it. Other than that, only suggestion I have is to recreate Sockets.

Refresh Nodes & recreate Sockets, both not work…
In fact, not only in CharacterBP, all of GetSocketLocation in other BPs do not work…

Hm. I may need to see project to investigate any further. Would you feel comfortable uploading it somewhere and giving me a download link?

This is my project download link:
https://.com/file/d/0B-Nuiy77jYioX2x3anlTdThMZGM/

I have deleted assets that have nothing with and change PlayerCharacter to default MyCharacter.
In this project, I use Sockets for light of lamp and attack slash

Hi Pseudor,

I’m not seeing this bug in project you provided. If I Print String Get Socket Location value for both AStart and AEnd, values appear as expected. If you open version of project you sent me, does something else occur?

Yes, I open this version of project, I can get Location Value for sockets, but when I Launch or Package it, Value will be wrong.

Ah, my mistake, I forgot to check in Launched and Packaged game for project you sent me. I was able to reproduce it in your project (though still not in a new project), so I entered a bug report and included your project for developers to reference (UE-7918). I’ll let you know as soon as I get a response.

Hi Pseudor,

I’ve tracked down issue and checked in a fix into main branch, which will be in 4.8. I’ve also nominated fix for inclusion in 4.7.4 hotfix, however I’ve got a workaround to suggest for you in meantime:

issue only occurs if pixels per unit on a sprite is exactly 2.56. If you change it even slightly, then value will be serialized and loaded properly in a cooked build, and avoid issue.

Cheers,
Noland

fix in main is: https://github.com/EpicGames/UnrealEngine/commit/a7f93ecc02aa0314220f9a79f883226b74b60a35

and fix in 4.7.4 is:
https://github.com/EpicGames/UnrealEngine/commit/05149cf92d9de2b0f3537bbf79bfce275dac577c

Cheers,
Noland