orientation

class OrientationMixin(name: str, similar_entities: list[str], **kwargs: dict)

Used in trains and wagons to specify their direction.

property orientation: float

The angle that the current Entity is facing, expressed as a float in the range [0.0, 1.0], where 0.0 is North.

Raises ValueWarning if set to a value not in the range [0.0, 1.0).

Note

This is distinct from direction, which is used on grid-aligned entities and can only be a max of 8 possible rotations.

Getter:

Gets the orientation of the Entity.

Setter:

Sets the orientation of the Entity.

Type:

float

Raises:

TypeError – If set to anything other than a float or None.