Download

Move Component To and Statish Mesh Component Behavior issue.

Hey All,

Simply put I am trying to shoot a cable out of my character and then attach it to the wall.

I want to do this with a line trace from my character and use the hit result to determine where the end point in world space. then I want to set the location of that end point as the new static location for the end of the cable.

My problem here is that I am getting some very strange variances in my use case. I have a screenshot of the blueprint below. I get the location of the hit result from my line trace then i set the visibility of 2 components to true. i then move one of those components over to that location.

issue_movecmptto.PNG

When I go to use it I would expect the hit result from the line trace will be the end location of the move component to portion. however it seems to be taking something else into account.

issue_movecmptto2.PNG

its off by a small amount here and if you turn your character it is now staticly floating in the same relative location to you as it was before. It sort of follows you around now.

issue_movecmptto3.PNG

if i shoot my line trace anywhere else then the components can end up completely behind me.

issue_movecmptto4.PNG

I’m not sure what else to try. This seems like it should just be working. Here is the setup of my character components. I have fiddled with this and got varying results but none that work the way i would expect them to.

f76ca867310d6fb771acbf14b32c64e058699f3e.png

Hey !

I think that your problem come from your sphere trace.
Your end point looks wrong, Try to put your “Location” from Hit Result to your end Point for the Sphere trace

Best regards.

Hey Erodann,

The sphere trace is actually correct. It is supposed to do a sphere 50 units in diameter from where the HookAttach component is. Sorry for the bad screenshots but if you look closely there is a simple sphere mesh inside that sphere trace that i am using as the end location for my cable component.

I should be able to have the sphere component (which is a child of my character’s components) move to the location of my line trace’s hit result but it doesn’t go to it. It goes in some other seemingly random direction. I found this particular wall in my level would at least place it in front of me so I could properly show the discrepancy with screenshots. If I do the line trace and get a hit result from any other location it goes way off which you can see from my 4th screenshot. the cable is pointing behind me and when I turn around to “look at it” it stays behind me.

Hello,
Have you try to use impact point instead of location ?

Hey Fen,

I believe I did but I’m at work at the moment and unable to whip it up real quick to try again. I will try that as soon as I get back. However, what confuses me is the fact that I can move my capsule component to the hit location and it works; but when I move the static mesh component to that same location (or try to) it doesn’t go to it.

Is there some difference between impact point and hit location that could resolve that?

Yes indeed “impact point” does the same exact thing as hit location.

I’m getting the latest update and I will try again. Maybe I need to make a scene actor that is a child of the capsule then make a static mesh the child of the actor.