Having a simple plane always facing camera
Posted: Sun Jan 24, 2021 6:01 pm
I was trying to find a guidance for this functionality but I didn't find anything what would provide an answer.
I am trying to create a 3D model, which would have a "pedestal" similar to a chess piece and a simple plane on top of it.

Such model would be placed in 3D space and the plane would "roll" according to the angle to camera. Basically the lower part of the plane would keep its vertices' positions and the top two vertices would change its location so the texture/plane would always faces the camera directly (the texture would not be skewed).
I know that I need to use a vertex shader to modify the vertices positions but I cannot figure out how. Did anyone try to solve similar functionality?
Thank you for any advice.
I am trying to create a 3D model, which would have a "pedestal" similar to a chess piece and a simple plane on top of it.

Such model would be placed in 3D space and the plane would "roll" according to the angle to camera. Basically the lower part of the plane would keep its vertices' positions and the top two vertices would change its location so the texture/plane would always faces the camera directly (the texture would not be skewed).
I know that I need to use a vertex shader to modify the vertices positions but I cannot figure out how. Did anyone try to solve similar functionality?
Thank you for any advice.