Feedback Player

Hits, steps and impacts answer by themselves. The Feedback Player is for every other moment of your game: a pickup, a jump, a button, a door, a level up, an explosion. You fill a list with feedbacks (a sound, a shake, a flash, a punch, an effect) and play the list from code, from a UnityEvent, or with no code at all.

Your players' comfort options (shake, flashes, vibration, volumes, reduced motion) apply to every row by themselves.

Make one (about a minute) #

  1. Select an object and choose Tools > Responsive FX > Add Feedback Player (or Add Component, Responsive FX, Feedback Player).
  2. Press Add a ready moment and pick one, for example Pickup. Or press Add feedback and build your own list.
  3. Put your own clip in the Sound row.
  4. Play it:
GetComponent<FeedbackPlayer>().Play();              // at this object
player.Play(1.5f);                                  // a bigger version of the same moment
player.PlayAt(point, direction, strength);          // at a place, with the way it travelled
FeedbackPlayer.Play(gameObject);                    // finds the player on the object or a parent

No code: drag the Feedback Player into any UnityEvent (a UI Button's On Click, an Animation Event relay, your own events) and pick FeedbackPlayer.Play. TryPlay() is the same from code and tells you whether it started. Or add a Feedback Trigger (below).

Press Play in the inspector while the game runs to try a list. Stop puts back whatever the rows changed.

The list #

Each row is one feedback. Its coloured stripe shows its group, the grey text says what it will do, and its settings are folded inside.

  • The tick switches a row off without removing it.
  • Delay: seconds before the row starts, counted from the play (or from the end of the last Wait above it).
  • Chance: how often it plays. 0.5 plays half the time.
  • Label: your own name for the row.
  • The "..." button: move up, move down, duplicate, remove.

Rows start together unless they have a delay. To build a sequence step by step, put Wait rows between them: every row under a Wait counts its delay from the Wait's end.

The kinds of feedback #

Group Feedbacks
Sound Sound (random clip and pitch from a pooled voice, optionally heard by AI), Audio Source (play, stop, pause), Noise for AI, Surface response (the surface that is there answers with its own sound, effect and mark)
Camera Camera shake (with a punch, distance falloff, optional Cinemachine impulse), Camera zoom kick
Time Freeze frame, Slow motion
Screen Screen flash (with flash safety), Screen pulse (vignette and colour fringe)
Look Flash (tints an object and its children), Material value (a dissolve, a glow), Light pulse
Motion Scale punch (squash and stretch, works on UI), Position punch (or shake), Rotation punch, Move, turn or scale (with easing, there and back or to stay)
Effects Particle burst (built-in sparks and dust), Spawn effect (your prefab, pooled), Particle System (play, stop, emit)
Game Switch object on or off, Destroy object, Animator parameter, Push (a Rigidbody, 3D or 2D), Event (a UnityEvent)
Text, UI and vibration Floating text (in your damage numbers' look), UI fade (a Canvas Group), Vibration (gamepad and phone), Hit reaction (a full hit on a Hit Feedback)
Flow Wait, Play another list

Motion feedbacks are laid on top of the object: your own scripts, animation and physics keep moving it underneath, and when the feedback ends nothing is left behind.

Ready moments #

Add a ready moment fills the list with a tuned starting point you then change: Pickup, Jump, Landing, Button press, Explosion, Damage taken, Level up and Door. From code: FeedbackMoments.AddTo(player, FeedbackMoment.Pickup).

The same eight moments are in Samples/Feedbacks as Feedback Sequence assets with sample sounds: drag one into a player's Sequence field to hear it at once. In the Response Playground, the mushrooms, the shrine and the campfire are each a Feedback Player with a Feedback Trigger and no code.

Player settings #

Setting What it does
Sequence A saved list to play first (see below).
Target The object rows act on when they name none. Empty: this object.
Intensity Scales every row. Play(strength) multiplies with it.
Auto Play Never, On Start or On Enable.
Time Game Time stops with a pause and slows with slow motion. Real Time keeps running, for menus.
Cooldown The shortest time between two plays. A play that comes sooner is ignored.
Loop, Loop Delay Starts again after the last row until Stop() is called.
On Play, On Finished UnityEvents. In code: the Played and Finished events.

Feedback Trigger: no code #

Add Feedback Trigger beside a Feedback Player and pick what plays it: a bump (3D or 2D), something entering or leaving its trigger collider, the object being switched on, switched off or destroyed. A bump plays at the point of contact and plays harder for a faster bump. A trigger plays at this object (a pickup, a pressure plate) or, with Play At set to Other Object, at the thing that came in (a splash where the character stepped). You can limit it to a Unity tag and to layers.

An object that is switched off or destroyed cannot play its own player: give the trigger a Sequence for those two.

Saved lists (Feedback Sequence) #

Assets > Create > Responsive FX > Feedback Sequence makes a list as an asset. Use it to make a moment once and share it:

  • Give it to the Sequence field of many Feedback Players. Each player adds its own rows after it.
  • Play it anywhere from code, with no player of your own (a hidden, reused one does it):
explosion.Play(position);                                   // FeedbackSequence explosion
explosion.Play(position, strength: 2f, direction, actOn: gameObject);
  • Hits: each kind in a Hit Feedback Profile (Normal, Critical, Heal and so on) has a Feedbacks field. The list plays on the target whenever a hit of that kind lands: a beat of slow motion for a critical, a glow for a heal.
  • Surfaces: each answer of a surface (a cell in Impact Lab) has a Feedbacks field. The list plays at the contact: a camera shake for a heavy landing on metal.
  • Response Graph: the Play Feedbacks box plays a list when its rule matches.

Players' options and the Feedback Switch #

  • Camera shake and zoom follow the player's Shake option and reduced motion.
  • Flashes and pulses follow the Flashes option and flash safety.
  • Freeze frames are halved by the Reduced hitstop choice; slow motion is left out with reduced motion.
  • Sounds follow the volume options; particles the Effects option; vibration the Vibration option.
  • With the Feedback Switch off (comparing your game with and without feedback), rows that players only see, hear or feel sit out. Rows your game depends on (Event, Switch object, Destroy, Animator, Push, Move, Wait, Noise for AI) still play.

Player options never change gameplay: noise for AI, events and pushes are not scaled by them.

Write your own feedback #

Derive from Feedback, mark the class [Serializable], and it appears in every Add feedback menu.

using System;
using RareGeometry.ResponsiveFX;
using UnityEngine;

[Serializable]
[FeedbackInfo("Spin", FeedbackCategory.Motion, "Spins the target once.")]
public sealed class SpinFeedback : Feedback
{
    public float seconds = 0.4f;

    Transform target;
    float turned;

    public override float Duration => seconds;                       // 0 would mean "over at once"

    public override void Begin(in FeedbackContext context)           // once, when its time comes
    {
        target = context.Target(null);
        turned = 0f;
    }

    public override void Run(in FeedbackContext context, float progress)   // every frame, progress 0 to 1
    {
        var angle = FeedbackEasing.Evaluate(FeedbackEase.EaseInOut, progress) * 360f;
        target.Rotate(0f, angle - turned, 0f);
        turned = angle;
    }
}
  • context.Position, context.Direction, context.Intensity and context.Owner say where, which way, how hard and on what.
  • Override End to put back what you changed (it is also called when the player is stopped).
  • Override Cosmetic to return false when your game depends on the row.
  • Keep what the row is doing in private fields: every player has its own rows, saved lists are copied per player.

If you know Feel #

The Feedback Player works the way you expect, with other names. Both can live in one project: the Feel bridge plays surface answers and hits from a Feel player, and the other way round.

In Feel Here
MMF Player Feedback Player
PlayFeedbacks(), PlayFeedbacks(position, intensity) Play(), PlayAt(position, direction, strength)
Add new feedback Add feedback
Initial delay, Chance, Label Delay, Chance, Label on every row
Pause, Holding Pause Wait
Feedbacks Intensity Intensity
Time scale mode Time: Game Time or Real Time
A prefab of a player, reused A Feedback Sequence asset, played by any player or from code
Custom MMF_Feedback class A class derived from Feedback

What is different: hits, footsteps and impacts need no list at all (a surface answers by itself), every row follows your players' comfort options, and AI can hear a moment (the Sound row's noise radius, the Noise for AI row).

Good to know #

  • A play that arrives while the list is still running starts it again from the top.
  • Playing makes no garbage once warm: sounds, particles and spawned effects are pooled.
  • A Feedback Player works in 2D and 3D, on UI, and with every render pipeline.
  • Rows keep running after the frame that started them only while the game runs: the inspector's Play button needs Play Mode.

Something unclear or wrong? Tell us · Get help