Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IPointerEvent

This interface describes properties available to pointer events.
Read time 2 minutesLast updated 5 days ago

Definition

public interface IPointerEvent

Properties

Property

Description

actionKeyGets a boolean value that indicates whether the platform-specific action key is pressed. True means the action key is pressed. False means it isn't.
altitudeAngleGets the angle of the stylus relative to the surface, in radians
altKeyGets a boolean value that indicates whether the Alt key is pressed. True means the Alt key is pressed. False means it isn't.
azimuthAngleGets the angle of the stylus relative to the x-axis, in radians.
buttonGets a value that indicates which mouse button was pressed or released (if any) to cause this event: 0 is the left button, 1 is the right button, 2 is the middle button. A negative value indicates that no mouse button changed state during this event.
clickCountGets the number of times the button was pressed.
commandKeyGets a boolean value that indicates whether the Windows/Cmd key is pressed. True means the Windows/Cmd key is pressed. False means it isn't.
ctrlKeyGets a boolean value that indicates whether the Ctrl key is pressed. True means the Ctrl key is pressed. False means it isn't.
deltaPositionGets the difference between the pointer's position during the previous mouse event and its position during the current mouse event.
deltaTimeGets the amount of time that has elapsed since the last recorded change in pointer values, in seconds.
isPrimaryGets a boolean value that indicates whether the pointer is a primary pointer. True means the pointer is a primary pointer. False means it isn't.
localPositionGets the pointer position in the current target's coordinate system.
modifiersGets flags that indicate whether modifier keys (Alt, Ctrl, Shift, Windows/Cmd) are pressed.
penStatusSpecifies the state of the pen. For example, whether the pen is in contact with the screen or tablet, whether the pen is inverted, and whether buttons are pressed. On macOS, penStatus will not reflect changes to button mappings.
pointerIdGets the identifier of the pointer that sends the event.
pointerTypeGets the type of pointer that created the event.
positionGets the pointer position in the Screen or World coordinate system.
pressedButtonsGets a bitmask that describes the buttons that are currently pressed.
pressureGets the amount of pressure currently applied by a touch.
radiusGets an estimate of the radius of a touch.
radiusVarianceGets the accuracy of the touch radius.
shiftKeyGets a boolean value that indicates whether the Shift key is pressed. True means the Shift key is pressed. False means it isn't.
tangentialPressureGets the pressure applied to an additional pressure-sensitive control on the stylus.
tiltSpecifies the angle of the pen relative to the X and Y axis respectively, in radians.
twistGets the rotation of the stylus around its axis, in radians.