Main Content

vrjoystick

Create joystick object

Description

Creation

Description

joy = vrjoystick(id) creates a joystick object capable of interfacing with a joystick device. The id parameter is a one-based joystick ID. The joystick ID is the system ID assigned to the given joystick device. You can find the properties of the joystick that is connected to the system in the Game Controllers section of the system Control Panel.

joy = vrjoystick(id,'forcefeedback') enables force feedback if the joystick supports this capability.

Object Functions

axisRead status of joystick
button Read status of joystick
capsJoystick capabilities
closeClose and invalidate joystick
forceApply force feedback to joystick axis
povApply force feedback to joystick axis
readRead status of joystick button, axes and pov
Introduced in R2007b