PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

InputObject

Show deprecated

InputObject

Show deprecated

An object created when an input begins that describes a particular user input, such as mouse movement, touches, keyboard, and more.

The object’s properties vary according the the type of input. Properties can be used to determine input Enum/UserInputState|state, Enum/UserInputType|type, DataType/Vector3|position, DataType/Vector3|delta, and the Enum/KeyCode that triggered the input (if applicable).

Once created at the beginning of an input, the same object persists and is updated until the input ends. As a result, you can track the object’s changes using the Instance/Changed|Changed event as the user changes the input in question. You can also place these objects into a list of active inputs track and interact with the object after it’s creation by an event such as UserInputService/InputBegan.

#See also

  • Most UserInputService events and functions return an InputObject to describe user input events and states
  • GuiObject events related to user input return an InputObject to describe user input

Properties

Vector3

Delta

A Vector3 describing the Delta between mouse/joystick movements

KeyCode

KeyCode

Contains an Enum that describes the kind of input used

Vector3

Position

Describes a positional value of this input

UserInputState

UserInputState

The state of the user’s input

UserInputType

UserInputType

The type of user input

Functions

Events