VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Can Rotate

Can Rotate




This trait allows a piece to be rotated through an arbitrary number of facings.

You can choose the number of valid facings.  For example, a hex-based game may have 6 (or possibly 12) possible facings, while a game with a square grid game might have 4 or 8.

Alternatively, you can allow any arbitrary facing.  In this case, selecting the 'Rotate' command will change the cursor and let the user drag the cursor to select the facing of the piece interactively.

An optional additional command will rotate the piece to a random facing (in one of the valid facings, if applicable)

The "Can Rotate" trait will rotate only those traits that appear above it in the list of traits for a Game Piece.  Traits below the "Can Rotate" trait will be drawn on top of the rotated image.

NOTE: Since the rotations are created on the fly from a bitmapped image, the image quality of a rotated counter may be lower than the unrotated version.  You may get better image quality for your rotations by creating separate images for each rotation in an external paint program (If your images are based on vector objects, you can rotate them without degrading quality.) and putting them into different levels of a Layer.

 


A Can Rotate trait defines a number of Properties.  In the name of the properties, <name> is the name specified in the  properties above.