Main Content

vrjoystick

Create joystick object

Description

Create a joystick object.

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
povRead status of joystick point of view
readRead status of joystick button, axes and pov

Version History

Introduced in R2007b