Monogame - Billboarding

This is an incredibly easy thing to do using Monogame. As an example of what is meant by billboarding, check the image below:

.

The scene is in full 3D but instead of using 3D models, I opted for Sprites that always face the camera/player. Used in old 3D games such as Wolfenstein it is nothing new. It is not solely what this is used for either. In larger 3D games, billboards can be used as substitutes for 3D models on objects that are far away. Scenes with large rolling hills and forests upon them for an example. A tree can be a billboard beyond a certain distance.

Monogame provides a static function for creating a billboard matrix. Simply substitute your typical 3D world/model matrix for the billboard matrix and you have your 2D sprite in a 3D world.

.

The above image shows the function used to draw the goblin in the previous image. The rotation matrix is omitted and where you would use the usual 3D model matrix, use Matrix.CreateBillboard(ObjectPosition, PositionOfViewer/Camera,UpVector, DirectionOfViewer/Camera).