Calculate from world to local space

Does anyone know how ‘Inverse Transform Location’ works or just how i can calculate from world to local space by hand (Sockets/Bone included)?

The Inverse Transform Location node takes a FTransform parameter and a FVector parameter. In the doc (linked in the previous sentence), you can find this helpful note:

“If T was an object’s transform, this would transform a position from world space to local space.”

So, yes, this node converts world space to local space, as you suspected; the local space you get pertains to the Transform parameter you provide.

If you need to convert a world space position to a position in local space for a specific socket, you might try grabbing the socket’s Transform using the Get Socket Transform node. Then just plug the socket’s transform into the Inverse Transform Location node, provide a location vector, and out comes your converted local-space location.

Hopefully that answers your question!

Thanks for the bulky answer, but I think I did not express the problem correctly. I dont want to use these blueprints, i just want to understand how to calculate it with a pen and paper (world to local).

Ah. Well, that’s a bit above my head. I suspect the math involves the use of a Rotation Matrix (or perhaps a more general Transformation Matrix) or two to convert from one coordinate space to another, but I don’t trust my understanding well enough to try to explain exactly how.

If you’re willing to cheat, you could always pull up the UE4 source code for the Blueprint functions I posted about above. The exact code and math that the engine uses to solve the problem will be visible there. The function in question (and a lot more related code) can be found in the UKismetMathLibrary class.

That’s all I can offer. Hope it’s of some help to you.