- Home /
How to make 2D aiming line?
I want to make this kind of ball aiming line. I tried to use Raycast and LineRenderer, but it doesnt work. please help me!
hit = Physics2D.Raycast(transform.position, (JointPoint.transform.position - transform.position).normalized);
TargetLine.SetPosition(0, transform.position);
TargetLine.SetPosition(1, hit.point);
aimiming-line.png
(54.9 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612121750im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Copy of GameObject gets destroyed instead of GameObject itself 2 Answers
Spritest look squashed and stretched in different screens. 1 Answer
How to sync animation if animation should be use with specially object 0 Answers
Is it passible to make a ¨2D¨ sprite game with unity? 6 Answers
2D Rotation for aiming problem 1 Answer