TSdlHapticCondition
A record containing a template for a Condition effect.
The record handles the following effects:
- TSdlHapticKind.Spring: Effect based on axes position.
- TSdlHapticKind.Damper: Effect based on axes velocity.
- TSdlHapticKind.Inertia: Effect based on axes acceleration.
- TSdlHapticKind.Friction: Effect based on axes movement.
Direction is handled by condition internals instead of a direction member. The condition effect specific members have three parameters. The first refers to the X axis, the second refers to the Y axis and the third refers to the Z axis. The right terms refer to the positive side of the axis and the left terms refer to the negative side of the axis. Please refer to the SDL_HapticDirection diagram for which side is positive and which is negative.
Definition
Unit: Neslib.Sdl3.Haptic
See Also
Properties
Name | Description |
---|---|
Button | Button that triggers the effect. |
Center | Position of the dead zone; [0..2]. |
DeadBand | Size of the dead zone; [0..2] max $FFFF: whole axis-range when 0-centered. |
Delay | Delay before starting the effect. |
Direction | Direction of the effect. |
Interval | How soon it can be triggered again after button. |
Kind | TSdlHapticKind.Spring, TSdlHapticKind.Damper, TSdlHapticKind.Inertia or TSdlHapticKind.Friction |
LeftCoeff | How fast to increase the force towards the negative side; [0..2]. |
LeftSat | Level when joystick is to the negative side; [0..2] max $FFFF. |
Length | Duration of the effect in milliseconds. |
RightCoeff | How fast to increase the force towards the positive side; [0..2]. |
RightSat | Level when joystick is to the positive side; [0..2] max $FFFF. |
Property Descriptions
Button
Button that triggers the effect.
property Button: Word read FHandle.button write FHandle.button
Type: Word
Center
Position of the dead zone; [0..2].
property Center[const AIndex: Integer]: Smallint read GetCenter write SetCenter
Type: Smallint
DeadBand
Size of the dead zone; [0..2] max $FFFF: whole axis-range when 0-centered.
property DeadBand[const AIndex: Integer]: Word read GetDeadBand write SetDeadBand
Type: Word
Delay
Delay before starting the effect.
property Delay: Word read FHandle.delay write FHandle.delay
Type: Word
Direction
Direction of the effect.
property Direction: PSdlHapticDirection read GetDirection
Type: PSdlHapticDirection
Interval
How soon it can be triggered again after button.
property Interval: Word read FHandle.interval write FHandle.interval
Type: Word
Kind
TSdlHapticKind.Spring, TSdlHapticKind.Damper, TSdlHapticKind.Inertia or TSdlHapticKind.Friction
property Kind: TSdlHapticKind read GetKind write SetKind
Type: TSdlHapticKind
LeftCoeff
How fast to increase the force towards the negative side; [0..2].
property LeftCoeff[const AIndex: Integer]: Smallint read GetLeftCoeff write SetLeftCoeff
Type: Smallint
LeftSat
Level when joystick is to the negative side; [0..2] max $FFFF.
property LeftSat[const AIndex: Integer]: Word read GetLeftSat write SetLeftSat
Type: Word
Length
Duration of the effect in milliseconds.
property Length: Cardinal read FHandle.length write FHandle.length
Type: Cardinal
RightCoeff
How fast to increase the force towards the positive side; [0..2].
property RightCoeff[const AIndex: Integer]: Smallint read GetRightCoeff write SetRightCoeff
Type: Smallint
RightSat
Level when joystick is to the positive side; [0..2] max $FFFF.
property RightSat[const AIndex: Integer]: Word read GetRightSat write SetRightSat
Type: Word