Get Socket Transform location issue

Hi I have issue with Get Socket Transform when shooting
Video:

My blueprint:

Can anyone help me ?

Is the X vector of the socket pointing towards the end of the gun?

Is that the socket sitting on the ground?.. :slight_smile:

Sorry for late replay i dont know what you mean but this picture of location
idk how this sitting on the ground

You’re doing a trace from the socket. That means the socket needs to be on the muzzle of the gun, pointing along the barrel.

As far as I can see, your socket is sitting in the level at 0,0,0 which is why the trace is sitting vertically in the level

image

The socket should be here

image

the problem is socket on the muzzle but still same issue

Socket:

I don’t know how you’re doing it… :slight_smile:

I’ve done exactly the same thing with the demo gun, and it’s fine…

I know what the issue is. The problem is how I call the mesh. I created a new project and added the weapon mesh and socket. Then, I created two Skeletal Meshes one for the player and the other for the actor component. When I call ‘Get Socket Transform’ for the player, it works, but in the actor component, it doesn’t work. You can see the picture to understand what i mean.

Here How I create mesh in actor component

I hope you understand what i describe because my English it’s decent

but still i don’t know how to fix it :sweat_smile:

It’s very hard to see, I’d say, set the skeletal mesh asset before trying to attach it :slight_smile:

oh sorry, i didnt understand but this better picture

Try swapping these nodes

image

same thing

but create it two weapons

Sorry, I have no idea how you are doing this… :melting_face:

I would try your code with the standard weapon. Once you have that working, then expand, and try it with you gun. Then try with a component.

I fixed, I just make skeletal mesh in player then promoted to variable and connected to component.
Screenshot 2024-01-29 171602


1 Like

Very good :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.