C++ and BP versions of GetSocketLocation return different results

Hi, guys. As the title says, I’m getting different vectors returned by this function and I don’t know why.

This is my CPP class for a Weapon that implements a BlueprintNativeEvent called Fire. Inside i’m trying to get the muzzle socket location (“muzzle”) and use it as a spawning location for the bullet. The bullet itself is BP.

// Sets default values
AWeapon::AWeapon()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

    Mesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("Mesh component"));
    RootComponent = Mesh;

    static ConstructorHelpers::FObjectFinder<UBlueprint> ProjectileBlueprint(TEXT("Blueprint'/Game/Weapons/AKM/Bullet_762.Bullet_762'"));
    ProjectileSpawn = NULL;
    if (ProjectileBlueprint.Succeeded())
    {
        ProjectileSpawn = (UClass*)ProjectileBlueprint.Object->GeneratedClass;
    }

}

// Fires weapon
void AWeapon::Fire_Implementation()
{
    FActorSpawnParameters SpawnParams;
    SpawnParams.Instigator = Instigator;
    SpawnParams.Owner = this;
    SpawnParams.bNoFail = true;
    //FTransform  ProjectileStartPosition = Mesh->GetSocketTransform(TEXT("muzzle"));
    FVector ploc = Mesh->GetSocketLocation("muzzle");
    FString plocString = ploc.ToString();
    FRotator prot = Mesh->GetSocketRotation("muzzle");

    AActor* proj = GetWorld()->SpawnActor<AActor>(ProjectileSpawn, ploc, prot, SpawnParams);

    GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Red, plocString);
}

The resulting code is spawning the projectile at the origin of my skeletal mesh (weapon model), instead of socket location.
Seeing that, I’ve decided to double check the spawn location value and moved the spawning projectile part out of the c++ to my weapon blueprint. It turned out that the BP version spawns projectile just fine at muzzle location.

And here is the difference between C++ GetSocketLocation and BP version called on the same skeletal mesh.

Green — BP value (correct location)

Red — C++ value

Have no idea what i’m doing wrong, can anyone enlighten me?

I have the same problem. Did you solve it ?