- Home /
Question by
B-W-L · Mar 11 at 03:31 PM ·
anglehitraycasthit2dphysics.raycast
RaycastHit2D How to return angle from one side?
In my code there is a raycsat hit and I get the hit.normal however it returns always an acute angle but I need it to do it from one side. I am rubbish at explaining so adding an image.
angles.png
(9.9 kB)
Comment
Best Answer
Answer by Master109 · Mar 11 at 05:52 PM
Use Vector2.SignedAngle instead of Vector2.Angle https://docs.unity3d.com/ScriptReference/Vector2.SignedAngle.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613054053im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Calculating angle using a raycastHit2D 1 Answer
iam using raycast.hit function.am trying to move vehicle over the terrain ups and down?? 0 Answers
Hit detection at angles of enemy character controller? 1 Answer
Findout if an object that was hit by raycast is still being hit (30 object that are instantiated) 0 Answers