Tilt

object Tilt

The tilt geometry of Windows Phone, transcribed from TiltEffect.cs (the RTM algorithm, "direct from the shell team"): a press rotates the plane towards the finger and pushes it away from the viewer, by an amount that trades off against the rotation.

A press in the exact centre is pure depression and no rotation; a press in a corner is the full 17.188° and no depression at all.

Properties

Link copied to clipboard
const val MAX_ANGLE_RADIANS: Float = 0.3f

Maximum rotation, in radians. MaxAngle in the original.

Link copied to clipboard

Maximum push-away. MaxDepression = 25 in Metro pixels at the canonical 0.75.

Link copied to clipboard
const val RETURN_DELAY_MILLIS: Int = 200

The delay before the plane springs back, and how long the return takes.

Link copied to clipboard
const val RETURN_DURATION_MILLIS: Int = 100