I have a problem on how to represent or compute the rendering of some 3D handles in my game
My goal is to render something at the side of a graphical plane (not infinite) based on the right vector of the camera.
see this
In this drawing the camera is at the right side of the object,
I need to draw the two circles at the edge of the plane based on where my camera right vector is.
![](https://uploads.gamedev.net/forums/monthly_2022_09/medium.16987007ff504bb4b936aac9f60a99aa.image.webp)
If I rotate the camera to say infront of the object it will look like this
![](https://uploads.gamedev.net/forums/monthly_2022_09/medium.3664bf5ed4024909a23dffe6a7daa6ad.image.webp)
Same if the camera is at the side
![](https://uploads.gamedev.net/forums/monthly_2022_09/80e661f703e14c09afc5850acc995631.image.png)
by the looks of it it is easy.
as i just need to get the look vector by subtracting camera position and object position, and cross vector with object's Up vector and I can get the right vector and display.
my problem is, if the Plane is tilted or rotated, Example like this
(front view)
![](https://uploads.gamedev.net/forums/monthly_2022_09/medium.0b616e1811254621a187cd512b2719e8.image.webp)
if the above is front view and the plane is rotated in Z axis, i need to get the correct position of where to draw the two circles. I can get the ‘direction’ of this plane though, as this plane was drawn from a line and extruded so i have its normal, I just need to project the computed right vector based from the one i described above to this plane so that when i rotate the points are always inside that plane.
any one can help?