Line trace, hit by the direction from my ThirdPersonCharacter

I am curious what OP really needs. I might be simply misunderstanding what is required. There might be a disconnection between what capsule does and what sprite behaviour visualises. :person_shrugging:

1 Like

Hey yeah, im back. I couldnt write something here yesterday because of the maximum.
Thats exactly what i want.

1 Like

Trying to figure out what is the ideal behaviour:

image

Judging by the vid and by what has been said. We can look left, right or the clamped cone ahead of us? And tracing should reflect that? Am I getting closer?


Could you show the script that rotates the sprite? Not sure how that is done, I don’t do sprites much. Especially that you mentioned Paper ZD - a plugin, right?

Yeah Paper ZD or/and 2D is a plugin for 2D programming.

This is the Animation Sequence for each direction.


Here is the Animation Instance

image
And thats the Direction Variable connected to the Movement input “EnhancedInputAction IA_Move” with Action value X and Y

The Variable is a Vector 2D Type.

Sorry, I still do not understand what the expectations are. Could you elaborate on this post?


If you have a direction vector already, use it for tracing. You attached arrows to the capsule and expect them follow the arbitrary rules of the sprite rotation. This is not going to happen.

Of course it doesn’t work, that’s why I’m asking how to do it. I was asking how it could work, not why it can’t. And also I can’t connect my Vector variable to the Line Trace because it is a Vector 2D. And the line trace node has no vector 2D input. If you want to talk to me in more detail about this, we can do it over discord. i sent you a request a few days ago. Unfortunately in this forum I can only send limited messages, so I would prefer discord, of course if it would be okay for you.

It would look close to this. You can right click pins to change types.


Another way is to use normalised velocity as direction:

Now you’re tracing in the direction you’re moving.

Thank you very much for the solution. The second way has worked! Have a nice day.

1 Like

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