Tracing with a 2D Sprite

I’m trying to do tracing with a 2D sprite. problem is the trace always goes to the right of the character no matter what way I am facing.

I guess because its not really a 3d model, so technically he is always facing the same direction, the rest is an illusion?

Anyone know a fix for this? I read something about using a socket, but im using a sprite and thats only for 3d characters as far as I know.

Any help greatly appreciated …

To what dir you like trace ?
You are tested that with the different vectors ? (Right, Forward, Up ?)

*Check to use the Forward Vector with Pitch rotations from 0 to 360 and other rotations to 0

If the actual physical essence of the character doesn’t rotate, then you’ll have to work out the end position of the trace yourself. You won’t be able to use ForwardVector if it’s only the sprite inside the container that rotates or changes direction.

If you know what the rotation of the character is (which I’m assuming you do if you’re swapping out the sprite), then you can rotate a vector by that rotation and use that as the end point instead.

I believe sockets can only be attached to 3D Meshes, never tried adding one to a sprite, but it wouldn’t solve your issue anyway.

If you’re using the 4.7 preview you can indeed use a socket, but you would have to add/align the socket for every frame of every flipbook. What you can do that’s easier is instead put an arrow component in your character, and always trace out from the arrow’s origin and getforwardvector. That will sort of do all the math for you behind the scenes.

Ok I didn’t have to go through all of that, I just used the blueprint below. It works but I can only get a trace when my character is in movement, not when he stops moving and is stationary. Anyone know why, and how I could fix that?

f670371577e3af1af429da61943544c9b23143f4.jpeg

Anyone? :frowning:

Solved it.

In my situation, the arrow doesn’t rotate along with the sprite.