Click or drag to resize

PlayerController Class

A controller that uses Player Actions as the input sources for controller elements.
Inheritance Hierarchy
SystemObject
  RewiredPlayerController
    RewiredPlayerMouse

Namespace: Rewired
Assembly: Rewired_Core (in Rewired_Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class PlayerController

The PlayerController type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberabsoluteToRelativeScalingReferenceResolution The reference resolution for absolute to relative value scaling. This is used in conjunction with absoluteToRelativeScalingMode to determine how to scale absolute values to relative values. When absoluteToRelativeScalingMode is set to any of the screen / viewport scaling modes, if the scaling mode is based on the horizontal dimension of the screen / viewport, the horizontal resolution will be divided by the reference X resolution to determine the final scaling factor. For example, if the horizontal reference resolution is 1920 pixels and the current screen / viewport horizontal resolution is 3840 pixels, the final scaling multiplier will be 2, resulting in a doubling of value to compensate for the increased resolution. If the scaling mode is based on the vertical dimension of the screen / viewport, the vertical resolution will be divided by the reference Y resolution to determine the final scaling factor. For example, if the vertical reference resolution is 1080 pixels and the current screen / viewport horizontal resolution is 720 pixels, the final scaling multiplier will be 0.66667, resulting in a reduction of value to compensate for the decreased resolution. [Default = 1920x1080]
Public propertyaxes The list of Axes in the controller.
Public propertyaxisCount The number of Axes in the controller.
Public propertybuttonCount The number of Buttons in the controller.
Public propertybuttons The list of Buttons in the controller.
Public propertyelementCount The number of Elements in the controller.
Public propertyelements The list of Elements of all types in the controller.
Public propertyenabled Is the controller enabled?
Public propertyplayerId The Player id of the Player used for the source of input.
Top
Methods
 NameDescription
Public methodGetAxis Gets the current axis value.
Public methodGetAxisRaw Gets the current raw axis value.
Public methodGetButton Gets the current value of the button.
Public methodGetButtonDown Gets the down state of the button. Returns True only on the first frame the button was pressed.
Public methodGetButtonUp Gets the up state of the button. Returns True only on the first frame the button was released.
Public methodGetElement(Int32) Gets the element at the specified index.
Public methodGetElementT(Int32) Gets the element at the specified index.
Top
Events
 NameDescription
Public eventAxisValueChangedEvent Triggered when the axis value changes.
Public eventButtonStateChangedEvent Triggered the first frame the button is pressed or released.
Public eventEnabledStateChangedEvent Triggered when the controller is enabled or disabled.
Top
See Also