Trace spawning at world location 0,0,0

Hey,

When I run simulation, the first trace of the play session spawns correctly but ends at world location 0,0,0 (only one of the traces, I’ve got 6 working simultaneously for my melee system). Any idea why this happens? I’m aware that the Weapon Collision 1 vector has a location of 0,0,0 - but why would it do this for only the first trace? All of the end locations has 0,0,0. Please click the picture links for better quality. :slight_smile:

Maybe it’s a result of requesting a location of NONE socket.

All the other traces are requesting a NONE socket, as the input is the Scene component. Considering it works for the 5 other traces, hmm… I’ve tried setting the socket name, to no effect.

Here’s some more of the BP, showing the other traces that work successfully.

Maybe there is something wrong with a component. Could you print what GetSocketLocation in malfunctioning block actually returns? (connect print node execution directly before Set Weapon collision 1)

It returns 0,0,0. If I set it up correctly for the debugging, that is.

Hello Devatsu,

I’d suspect that “Sequence” node - What if you set weapon collision 1 before firing the line trace? Also you could try using short delay nodes to troubleshoot “race conditions” (a delay node of 0 seconds will delay 1 frame)

Could you show how your collision boxes are attached and how you change them position if you do. At least I met a bug (on 4.17) when changing relative position of root component of an actor is the same as setting it’s world position.

That simply makes all the traces go crazy, aiming at the set weapon collision 1 location of 0,0,0. The start location of the trace is perfect, but the end location is the one at fault.

I’m using a Set Timer by Event in order to tick every delta second the traces, for fluid collision detection, so it’s constantly showing the world location of the socket when I move around. But I’m quite sure that the issue here is that Get Weapon Collision 1 which connects to the first line trace’s End location; not sure how I would work around the Sequence node to be honest.

I have 6 collision boxes along the weapon’s blade.

Still need some help with this. :slight_smile:

So you’re saying this only is happening on the first trace - That makes me think that the line trace is being called before weapon collision is set.

What if you swap the order that the sequence node is firing?

Well, the issue with the trace ending at 0,0,0 is not present when changing the sequence node, but now the line traces aren’t connecting properly.

Okay,so with a delay after the first execution pin of the Sequence node, using Get World Delta Seconds, I get a better result and it sets the first collision successfully, although now it is skipping a couple of the traces, as you can see there’s some gaps inbetween the traces.

Here’s the video that showed me how to set up the system; [Video here][1]
I’m not using an Event Tick, but a Set Timer by Event, triggered by the Attack event. The blueprint is showed at 1:30. I appreciate all the help so far! :slight_smile: