c# - Unity3d Drawing curves to show the angle between vectors -
i'm trying show interactively angle between 2 vectors in unity3d. example,
i need draw curve between "vectors" , show numeric value in degrees. know how calculate angle, got no success on how "draw" curve between them. tried use bezier curves, no success either.
i answer totally different.
you can try , go beziers or catmull-rom make more complex when can achieve more easily.
place circle ui image @ origin of angle. set type filled , clockwise.
now have slider indicating amount, match angle
image image = getcomponent<image>(); image.fillamount = getangle() / 360f; // range 0/1 need normalization
https://docs.unity3d.com/462/documentation/manual/script-image.html
Comments
Post a Comment