Download

How do I reference a Blueprint class's static mesh's socket?

I’m spawning an actor, which is a Blueprint class which uses a static mesh that has a socket.

Could anyone please tell me how to get the socket’s location?

I use the socket to get a single-pixel-sized location (as the actor might spawn inside a wall, which means I can’t use it with a line trace which would be immediately blocked). If I’m going about it the wrong way, any suggestions would be welcome. :slight_smile:

you need to get location from the static mesh component of the blueprint and not just the blueprint.

drag a wire from your blueprint and select static mesh or whatever your componenets name is and then you’ll get a node for the component. drag a wire from this node and select get socket location node.

Thanks Shep, but I still can’t tell how to get to the socket location.

If I am more specific, that may be more helpful. I clearly need my hand held here. :frowning: I feel like an idiot. I know what I want to do, I just don’t know how to get there.

I’m in the Pistol blueprint. I have used SpawnActor Bullet, then Set Actor Rotation on it. I then store the location of the Bullet, and use Line Traces to see if it is visible to a Vector inside an array. I’m guessing that the best time to do this is immediately after Set Actor Location. Here’s the blueprint.

b686bbb4c17e90de52d62342b32227fe9d811667.png

So, just for the sake of clarity, the question is how do I get the location of the Bullet’s static mesh’s socket?

Many thanks, all!

It’ll probably be something similar to this:
StaticMeshSocket.png

Not similar enough, eanandroid. :frowning:

I can’t find how to access anything through Bullet. I’ll go back to AnswerHub.

Hi eanandroid, it turns out your answer was correct, but I wasn’t pulling the wire from the blue pin, I was using the main execution pin. When you do that, a totally different menu comes up, with the Get Socket Location. D’oh!