Example

First-Person
Push & Pull

Give the player the ability to push and pull tagged physics objects using separate key presses. No code required — two PhysicsForceZone components and two InputKeyPress components do the work.

E key pushes objects away
Q key pulls objects toward player
Only tagged objects are affected
Adjustable reach and force

The Idea

Two zones, one player

A PhysicsForceZone is an invisible trigger that tracks Rigidbody objects inside it and applies a force when told to. With the new Target Mode, the direction of that force is computed relative to the player — so the same component handles both push and pull depending on how it's configured.

Add two of them to the player. Wire each to a different key. Done.

Push Zone
Away From Target
Target Mode set to Away From Target. When ApplyForce() is called, every Moveable-tagged Rigidbody inside the trigger is launched away from the player. Direction is calculated per object at the moment of the key press.
Pull Zone
Toward Target
Target Mode set to Toward Target. Same trigger radius, same tag filter — but direction is reversed. Each Rigidbody is pulled toward the player. Leave Direction Target empty and the player is found automatically by tag.

Step by Step

Setting up the push & pull system

Everything lives on the player. The moveable objects are just tagged Rigidbodies — no components needed on them.

  1. 1
    Tag the player and verify the Player tag
    Select the player GameObject. In the top of the Inspector, confirm the Tag is set to Player. The force zones use this to auto-find the player when computing push/pull direction — no manual wiring needed.
  2. 2
    Tag your moveable objects and add Rigidbodies
    Select each object you want to be pushable/pullable. Set its Tag to Moveable (or any tag you choose — just use it consistently in the next step). Make sure each has a Rigidbody component — the force zones only affect Rigidbodies. A regular Collider (not trigger) is needed for physics to resolve.
  3. 3
    Add a Sphere Collider to the player and set it to Is Trigger
    Select the player. Click Add Component → Physics → Sphere Collider. Check Is Trigger. Set the Radius to the desired reach — 3 is a good starting point.

    Important: this single collider is shared by both PhysicsForceZone components — push and pull will have the same reach. If you want different radii (e.g. pull range of 2, push range of 5), see Two Separate Trigger Colliders below.
  4. 4
    Add two PhysicsForceZone components to the player
    Click Add Component → PhysicsForceZone twice. Configure them as follows:

    Push Zone (first one):
      Target Tag: Moveable
      Target Mode: Away From Target
      Direction Target: leave empty
      Min Force / Max Force: 8 / 12
      Force Mode: Impulse
      One Force Per Stay: off

    Pull Zone (second one):
      Target Tag: Moveable
      Target Mode: Toward Target
      Direction Target: leave empty
      Min Force / Max Force: 8 / 12
      Force Mode: Impulse
      One Force Per Stay: off
  5. 5
    Add two InputKeyPress components and wire them
    Click Add Component → InputKeyPress twice.

    First InputKeyPress: Set This Key to E. In On Press Event, drag the player in, select PhysicsForceZone → ApplyForce() — choose the Push Zone (Away From Target).

    Second InputKeyPress: Set This Key to Q. Wire On Press Event to the Pull Zone's ApplyForce().
📐
Two Separate Trigger Colliders — for different push and pull reach
When both PhysicsForceZone components sit on the same GameObject, they share every trigger collider on that object. Both zones respond to the same radius.

To give push and pull independent radii, move each PhysicsForceZone onto its own child GameObject:

1. On the player, create two empty child GameObjects: name them PushZone and PullZone.
2. Add a Sphere Collider (Is Trigger) and one PhysicsForceZone to each child — Push on PushZone, Pull on PullZone.
3. Set the collider Radius independently on each child.
4. Keep the two InputKeyPress components on the player. In each event, drag in the corresponding child GameObject and select its ApplyForce().

The InputKeyPress components stay on the player — only the collider and PhysicsForceZone move to the children. The hierarchy then looks like the Two-collider variant shown in Scene Structure below.
💡
Selecting the right PhysicsForceZone in the event dropdown
When the player has two PhysicsForceZone components, the UnityEvent dropdown shows both. Hover over each ApplyForce() entry — Unity highlights the matching component in the Inspector so you can tell which is which. Alternatively, rename the two components in the Inspector header to "Push Zone" and "Pull Zone" for clarity.

Scene Structure

What the Hierarchy looks like

All force logic lives on the player. Moveable objects are standalone — no wiring on them at all.

Option A — Shared collider (same reach for push and pull)

📁 Player tag: Player
CharacterControllerFP
Sphere Collider Is Trigger ✓ · Radius 3 · shared by both zones
PhysicsForceZone Away From Target (Push)
PhysicsForceZone Toward Target (Pull)
InputKeyPress Key: E → Push Zone ApplyForce()
InputKeyPress Key: Q → Pull Zone ApplyForce()
📦 Crate tag: Moveable · has Rigidbody
📦 Barrel tag: Moveable · has Rigidbody

Option B — Separate child GOs (independent reach per zone)

📁 Player tag: Player
CharacterControllerFP
InputKeyPress Key: E → PushZone child → ApplyForce()
InputKeyPress Key: Q → PullZone child → ApplyForce()
📁 PushZone (empty child GO)
Sphere Collider Is Trigger ✓ · Radius 5 (wider push range)
PhysicsForceZone Away From Target
📁 PullZone (empty child GO)
Sphere Collider Is Trigger ✓ · Radius 2 (tighter pull range)
PhysicsForceZone Toward Target
📦 Crate tag: Moveable · has Rigidbody
📦 Barrel tag: Moveable · has Rigidbody

Event Flow

Complete wiring for this example

Each key fires one event. That event calls ApplyForce() on the matching zone. The zone computes direction relative to the player at that instant and launches every Moveable Rigidbody inside its radius.

ℹ️
Direction is computed per object at the moment of the key press
If three crates are inside the trigger when E is pressed, each gets a force vector pointing away from the player's position at that exact frame. Objects that are closer don't get stronger force — that's a future enhancement. All objects in the zone get the same magnitude, in slightly different directions.

Inspector Reference

Key fields to tune

These are the settings most likely to need adjustment when testing. Both zones share the same fields — tune them independently.

FieldWhat it doesRecommendation
Target Tag Only Rigidbodies with this tag are tracked and affected Use a dedicated tag like Moveable — don't reuse Player or Unity built-ins
Target Mode Sets whether force pushes away or pulls toward the player Away From Target = push · Toward Target = pull
Direction Target The reference point for direction. Leave empty to auto-find the Player tag Leave empty for this setup — auto-find handles it
Min / Max Force A random magnitude is chosen in this range each time a force is applied Start with 8–12 for Impulse mode; increase for heavier Rigidbodies
Force Mode How the force is applied to the Rigidbody Impulse feels snappy and responsive. Force feels gradual and wind-like
One Force Per Stay Each object can only be forced once per stay if checked Turn off for push/pull — you want to force on every key press, not just once per approach
Apply To First Only If on, only the first object found in the zone is forced per key press Leave off to affect everything in reach. Turn on if you want precise single-object selection
Sphere Collider Radius The reach of the force — on the Sphere Collider, not on PhysicsForceZone 3 units works for arm's length. Increase for a larger gravity-gun style radius
⚠️
Heavy objects may not move much
Unity's physics simulation applies forces relative to an object's mass. A Rigidbody with mass 100 will barely budge at force 10. Either increase Min/Max Force, or reduce the Rigidbody's mass on your moveable objects. The Rigidbody's Drag setting also affects how far objects travel after being hit.

Variants & Ideas

What you can build from here

This setup is a starting point. Small changes open up different mechanics.

Variant
Explosion on Key Press
Set Target Mode to Away From Target, increase Min/Max Force to 20–40, and set Sphere Collider Radius to 6. Wire a single key press. Everything tagged Moveable within 6 units gets blasted outward — instant explosion effect.
Variant
Continuous Pull (Wind / Gravity Well)
Set Apply On Enter to true on the Pull Zone and set Force Mode to Force. Objects are continuously pulled toward the player as long as they're in the trigger — no key press needed. Combine with a large radius for a gravity-well feel.
Variant
Puzzle: Push Block onto a Pressure Plate
Tag a single box as Moveable. Use the push mechanic to slide it. On the pressure plate, add an InputTriggerZone with Target Tag Moveable — wire its On Enter to whatever the plate should trigger. No code, pure events.
Variant
Pull to Collect (Magnetic Pickup)
Set Apply On Enter to true on the Pull Zone with Force Mode Force and a small radius. Tag coins or pickups as Moveable. They'll drift toward the player when nearby. Wire an InputTriggerZone (even smaller radius) to actually collect them on overlap.
💡
Multiple tags? Use multiple zones
PhysicsForceZone filters by a single tag. If you want push/pull to affect Crate-tagged objects differently from Enemy-tagged objects (different forces), add additional PhysicsForceZone components — one per tag. Each zone independently tracks its own set of Rigidbodies and can be wired to any key.