c# - Unity3d Drawing curves to show the angle between vectors -


i'm trying show interactively angle between 2 vectors in unity3d. example,

enter image description here

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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -