To “billboard” a Sprite means to adjust its rotation so that it is always facing the Camera. Games like Doom used a billboard effect on enemies and items. Mario 64 also used a billboard effect on its trees. This effect is evident when running around billboarded Sprites.

N64 super mario 64 start.jpg

The AddSpriteToBillboard will tell the calling Camera to hold a reference to the argument Sprite and adjust its rotation every frame so that it faces the Camera.


// Assuming mySprite is a valid Sprite:

Billboarding and Rotation

Billboarding is implemented by modifying the argument Sprite’s Rotation values. Therefore, a billboarded Sprite cannot be rotated on its X or Y axes. In other words, billboarding overwrites RotationX and RotationY values. Changing any rotation or rotation velocity values on the X or Y will not have any impact on billboarded Sprites. Billboarded Sprites can still be rotated on the Z axis.

Billboarding and Attachment

Both billboarding and attachments modify the rotation of PositionedObjects. To resolve this conflict, you are responsible for deciding which should take precedence. If you’d like the attachment to be dominant, you should not make a Sprite billboarded. If, on the other hand, you still want your Sprite to be billboarded, but it should have an attachment, set the ParentRotationChangesRotation property to false. For more information, see the ParentRotationChangesRotation article.