- Here, I am rotating a cube
- My method for determining which sides to show are the following:
- 1. Calculate the normal of each plane. You do this by finding the cross product of the vector that connects point 2 to point 1 and the vector that connects point 1 to point 0.
- 2. Take the vector from point 1 to the camera position and take the dot product of that with the normal. If this number is less than 0, then show that face but if it is greater than or equal to zero, do not show it.
- You can look at the code and math by right clicking then clicking inspect of press ctrl+shift+I