TeslasuitDocumentation
Plugins

Haptics & EMS

The Teslasuit delivers haptic and EMS feedback through electrical stimulation across an array of electrode channels. This page covers how the Unity plugin creates, targets, and plays that feedback. For the underlying concepts (what haptics is, haptic versus EMS, channels, signal parameters, calibration, comfort, and safety), see Concept: Haptics.

In the plugin, haptics is driven by the TsHapticPlayer component, which plays touches created in code, pre-authored assets, and physics-driven collisions.

⚠️ Calibrate before you stimulate. Calibrate the suit in the Control Center before any haptic or EMS playback. Amplitude is relative to the calibrated range, so calibration keeps a requested level consistent and comfortable. See Concept: Calibration.

Haptic and EMS#

The same channels produce a felt sensation (haptic) at low amplitude or a muscle contraction (EMS) at high amplitude. EMS is only useful on channels positioned over a muscle projection. For the full explanation and the comparison table, see Concept: Haptics.

Key features#

  1. Programmable touches: create effects in code from frequency, amplitude, pulse width, and duration.
  2. Assets from Studio: play .ts_asset haptic animations, effects, and touch sequences authored in Teslasuit Studio.
  3. Body-part addressing: target effects by anatomical bone, so the same code works across suit sizes and hardware versions.
  4. Collision-driven feedback: turn physics collisions on a character into haptics.
  5. Runtime intensity control: scale output with multipliers while playing.

Haptic parameters#

A touch is shaped by four parameters, passed to TsHapticPlayer.CreateTouch:

  • Frequency — signal frequency in Hz; the plugin converts it to a period internally. Range 0 to 150.
  • Amplitude — strength as a percentage of the calibrated range (0 to 100). Higher values produce a stronger sensation.
  • Pulse width — duration of the active pulse in microseconds, controlling the sharpness of the sensation. Range 0 to 320.
  • Duration — how long the touch lasts, in milliseconds.

For what each parameter feels like and the physiology behind it, see Concept: Haptics.

⚠️ Amplitude is relative to calibration, not the hardware maximum. An amplitude of 100 is 100% of the range established during calibration for that channel, not the hardware limit. Do not run stimulation on an uncalibrated suit. See Concept: Calibration.

Playing haptics#

The plugin plays haptics three ways, all through TsHapticPlayer:

  • Touches — instant, parameterised effects created in code with CreateTouch. See the Playing touches example.
  • Assets — patterns authored in Teslasuit Studio, imported as .ts_asset files and played with GetPlayable. See Haptic assets and the Haptic animation playback example.
  • Collisions — physics collisions on a character converted to haptics with the simplified collision builder. See the Bone channels & collision example.

Addressing the body by channel#

To keep the same code working across suit sizes and hardware versions, the plugin targets effects by anatomical bone rather than raw channel numbers. A TsHapticSimplifiedChannel asset pairs a BoneIndex (for example, RightUpperArm) with a BoneSide (Front or Back) and resolves to the channels the connected device exposes at that location. The plugin ships a channel asset for every body part.

See it on the Body & channel map. Switch between the Haptic and EMS layers to see which channels sit over each muscle group. The tool is Python-first, so its copy-paste snippet is Python, but the channel-to-body mapping it shows is the same one the plugin's simplified channels use.

Intensity control#

Multipliers scale haptic parameters (amplitude, period, pulse width) while playing, at two scopes: master multipliers affect everything the player is playing, and local multipliers affect a single playable. Global haptic power is a separate device-level comfort control set in the Control Center. See Concept: Haptics.

Concepts#

Reference#

  • Haptic reference: the TsHapticPlayer, simplified channels, collision handlers, and materials.
  • Haptic assets: the bundled .ts_asset files, their types, and the import pipeline.

Interactive tools#

  • Body & channel map: which suit channels map to which areas of the body, across haptic and EMS layers. Python-first, so the snippet it shows is Python, but the mapping applies to the plugin.

Examples#