I have a simple cube object, and the player can move this around the world. Movements are rigid/locked, as opposed to physics-based, so the cube will always have a flush face on the ground surface and be oriented with 90 degree snapping.

I am having trouble solving how I can determine the current state of my cube. Sure, I know the cube’s quaternion, but I struggle to reliably translate this to, for example, knowing in my component script that “the left face is currently facing down, and is oriented 90 degrees”.

My current solution works, via raycasting onto the cube (each face has a different hit collider), but I feel this is overkill to compensate for a nicer solution which presumably should be more efficient than raycasting.

Any advice is much appreciated.

A quick and dirty solution would be to calculate the angle distance from the cube’s up vector to all canonical vectors: Vector3.up, Vector3.left, etc… The canonical vector with the shortest distance to the up vector would tell you how the cube is rotated.