[Request] GetSocketLocalTransform

G’day,

In trying to do some math inside a blueprint involving sockets, I found I could not get the local transform of a socket.

A quick look in the SceneComponent header shows that while GetSocketTransform() and similar functions that return the world space of a socket are blueprint callable, those relating to the local/component space are not.

If its possible, could you please make them blueprint callable.

Thanks.

-Kris

Just to clarify, is this skeletalmesh socket you’re referring to? Since you mentioned local/component space. In case of staticmesh, local/component space is same.

What case do you need socket’s local (not component space) transform?

I was originally thinking of adding local as relative to actor(which means component space) to avoid confusion, but I’d like to confirm before adding it.

Thanks,

–Lina,

Hi Kris,

Thanks for the request, I have entered a report for this.

Cheers

Dear Christopher,

I added a node to my BP library to give you access to this C++ function :slight_smile:

You do not need to compile my plugin for this to work :slight_smile:

Enjoy!

http://forums.epicgames.com/threads/977316-(32)-Rama-s-Blueprint-Nodes-Plugin-For-You!-Fully-Toggleable-Ragdoll-Physics-For-You?p=31723884&viewfull=1#post31723884


C++ Code for the Node

bool UVictoryBPFunctionLibrary::Accessor__GetSocketLocalTransform(const USkeletalMeshComponent* Mesh, FTransform& LocalTransform, FName SocketName)
{
	if(!Mesh) return false;
	
	LocalTransform =  Mesh->GetSocketLocalTransform(SocketName);
	
	return true;
}

Rama

Thanks.

Just found myself wanting to convert a rotator to a vector… low and behold, you have included it.

Probably about time I get into creating a function library for these and other functions I may find useful.

One thing to note - for non-void functions, use BlueprintPure to remove the need for the exec nodes.

“One thing to note - for non-void functions, use BlueprintPure to remove the need for the exec nodes.”

Whoa, that’s a neat tip, thanks!

:slight_smile:

Rama