Skip to content
NP Editor Docs

Physics

New in 0.11.0: the scene actor Physics body (physics) and Enable physics for blocks and actors.

Physics makes balls, boxes, and groups of blocks fall under gravity, roll, bounce, tip over, and stack. They are stopped by static colliders (walls, poles, basketball rims) and by the blocks in the world. When they enter a sensor, it shows a message or sends them back to where they started. In ▶ Play you can hit, pick up, and throw balls.

The solver is NP Editor’s own deterministic rigid-body physics (20 ticks per second × 8 sub-steps). The editor and the server plugin NPBridge use the same formulas in the same order, so the same layout gives the same result in the editor preview, in ▶ Play, and in the game. To run it in the game, the server needs NPBridge 2.1.0 or later (the version bundled with this release’s installer is 2.4.0).

BodyWhat it doesQuick-add preset
DynamicAn object that falls, rolls, bounces, and tips overPhysics — Billiard ball (hit) · Physics — Basketball (pick up · throw)
Static colliderA wall, pole, or rim that moving objects hitPhysics — Static box (wall · backboard) · Physics — Static cylinder (pole) · Physics — Basketball rim (ring)
Sensor (on enter)Shows a message, resets, or stops a moving object that entersPhysics — Goal sensor (message) · Physics — Pocket sensor (reset)
World settings (unit · broken blocks)The mass unit and broken-block handling for the whole scene (one per scene)Physics — world settings (mass unit · broken blocks)
  1. Click Add on the toolbar and type physics in the search box. Eight physics presets appear under Actor.

  2. Click Physics — Billiard ball (hit). The ball is placed under the mouse and selected in the outliner. The top of the Details panel is Physics body, and under Properties you see the fields Body · Shape · Mass · Bounciness · Friction · Rolling resistance · Air drag · Gravity · Initial velocity …

  3. Type 4 in the X field of Initial velocity. At the start of the preview or the scene, the ball sets off toward +X at 4 blocks per second.

  4. Click Physics preview at the bottom of Details. The scene runs for 8 seconds with the current layout, and the ball returns to its authored position when it ends. To stop early, click Stop preview. If there are no moving bodies, you see “There are no moving physics bodies”.

  5. Click ▶ on the toolbar to start playing, look at the ball, and click. You hit the ball in the direction you are looking (when Interactable is Hit (left click) or Both). For picking up and throwing, see “Handling in Play” below.

  1. With the select tool (Q), select a few blocks, right-click in the viewport, and click Selection → physics block group (falls). The selected blocks are grouped into an actor and physics turns on immediately. They become a rotating rigid body that keeps the exact block shape (half blocks and stairs included). Press Ctrl+Z twice to go back.

  2. In Details, under Material · impact, select “Stone” in Material. Mass (volume × material density), bounciness, and friction are refilled with the stone values.

  3. Click Physics preview. The block group falls and tips over, and the impact line in Details shows “Last impact: … · impulse … · mean force … · speed … blocks/s” (plus a “Strongest impact: …” line if there was a stronger one).

  4. Click Disable physics (solidify into blocks) in Details. The group returns to world blocks in its current pose (undoable with Ctrl+Z).

  1. Under Add, click Physics — world settings (mass unit · broken blocks). Details shows the fields Mass unit · Broken blocks · Leave drops · Respect protection plugins · Start sequence. Keep only one per scene.

  • Three places to enable physics: right-click an outliner row and choose Enable physics; click the Enable physics button in the Actor group of Details; or right-click in the viewport and choose Selection → physics block group (falls). A block actor or a moving block group becomes a physics block group with the exact block shape. A display or text actor gets a moving physics box that follows it (Look = Follow actor). If you select several in the outliner, they all turn on at once.
  • Impact strength as logic: the World logic trigger When a physics object hits fires on impacts above Minimum impulse (physics settings unit) and Minimum speed (blocks/s). Use it for rules like “a glass bottle that falls hard plays a sound and shows a message”. It also fires in ▶ Play.
  • Same timing as a cutscene: enter a sequence id in the world settings Start sequence and physics starts from the beginning when that sequence plays. With Wake time (s) in the Timing (sequence time) fields, a body stays in its first pose until that time (to other bodies it is a fixed obstacle), and Hidden before wake hides it until then. The sequencer preview, the video render, and the in-game cutscene all use the same physics time.
  • Gentle hits by crouching: in ▶ Play, Shift (crouch)+click halves the hit power.
  • The preview does not change the world: the physics preview and ▶ Play never break blocks. They only show a “In game, block … would break (impulse …)” notice. Only the game server really breaks them.
Group · fieldContents
BodyDynamic · Static collider · Sensor (on enter) · World settings (unit · broken blocks)
ShapeSphere · Box · Cylinder · Ring (rim) · Block group. Size fields: sphere = diameter (X), box = width · height · depth, cylinder = diameter (X) · height (Y), ring = outer diameter (X) · tube thickness (Y)
MassEntered in the mass unit of the world settings (real = kg, 0.01 to 100,000 kg). One block = 1 m³: stone 2,500 · wood 700 · iron 7,800 kg
Bounciness · Friction · Rolling resistance · Air drag · Gravity0 = no bounce to 1 = full bounce (the two surface values are multiplied) · sliding friction · a ball rolling on the ground slowly stops (billiard cloth 0.015) · fraction of speed lost per second · gravity multiplier (1 = 9.81 blocks/s²)
Initial velocityBlocks per second. The body sets off at this speed at the start of the preview or the scene
Timing (sequence time)Wake time (s) (0 = from the start) · Hidden before wake · Initial spin (radians/s). Timed impulses (impulses) have no on-screen field; set them with the AI tool physics in the AI Studio in the editor (see the MCP tool list). Details shows only the count
Material · impactMaterial (table below) · Impact sound · Dust particles · Break block · Breaking power (strength is divided by this value; 2 = breaks twice as easily) · the last and strongest impact lines · Disable physics (solidify into blocks) (for block groups)
In-game lookLook (Item · Block · Hidden · Block group (per cell) · Follow actor) · Actor to follow · Item · Item model · Block · Look size · Editor color (editor only)
PlayerInteractable (None · Hit (left click) · Pick up · throw (right click) · Both) · Hit power · Throw power (blocks/s, 0 to 30) · Return when too far · Region (blocks)
SensorOn enter (None · Back to start (pocket) · Stop) · Message (action bar for nearby players, for example Goal!)
Buttons belowPhysics preview (8 seconds) · Stop preview

Choosing a Material refills mass (volume × density), bounciness, and friction. You can change them by hand afterward. Strength is the impulse (N·s) at which a block breaks.

MaterialDensity (kg/m³)BouncinessFrictionStrength (N·s)
“Stone”2,5000.150.715,000
“Tree” (wood)7000.30.65,000
“Metal”7,8000.20.560,000
“Glass”2,5000.10.4400
“Wool”3000.050.93,000
“Dirt · sand”1,5000.050.84,000
“Ice”9000.10.032,000
“Leaves”2000.050.8300
“Custom”1,0000.30.55,000

Blocks such as bedrock and obsidian never break.

For each impact, the editor computes the impulse (mass × change in speed, N·s), the mean force (N), and the approach speed (blocks/s).

ResultEditor (preview · ▶ Play)Game
Impact soundThe material’s sound (volume scales with strength)Played to nearby players
Dust particlesDebris at the impact point (count scales with strength)Same
Break blockOnly the notice “In game, block X, Y, Z would break (impulse …)”The block breaks if the impulse exceeds the material strength
Impact lines in Details“Last impact” · “Strongest impact”—
Trigger When a physics object hitsFires in ▶ PlayFires
FieldValueMeaning
Mass unitReal (kg · N·s) · Game (1 stone block = 1) · Custom (1 unit = ? kg)The unit used for display, impact strength, and the logic minimum impulse (calculation is always in kg). Changing it recalculates the logic minimum impulses to the same strength (one Ctrl+Z). For custom, use the 1 unit = kg field
Broken blocksKeep as is · Restore when the scene ends (default) · Restore after N seconds (Restore seconds)Whether blocks broken in the game are put back. The restore list is kept in a server file and restores after a restart too. It does not overwrite a block someone placed there in the meantime
Leave dropsOffDrops the item of a broken block. Always off while restore is on (prevents item duplication)
Respect protection pluginsOnFires a cancellable event before breaking; if a protection plugin cancels it, the block is not broken
Start sequenceEmptyEmpty = physics runs from the moment the scene turns on. With a sequence id, bodies stay at their first position until that sequence plays, then run from the beginning (playing it again restarts from the beginning)
ActionWhat it does
Click (left)Hits the body you look at, in the direction you look (Hit (left click) · Both). Half power while Shift (crouch) is held
Right-clickPicks it up (Pick up · throw (right click) · Both) and carries it in front of your eyes
Right-click while holdingThrows it in the direction you look (your walking speed is added)
Click while holdingPuts it down
WalkingYour body pushes the ball away

The reach is 4.5 blocks. Hitting and picking up are not available while simulating (out of body).

ItemContents
Required versionNPBridge 2.1.0 or later. With live sync, physics bodies are not sent to an old server (2.0.9 or earlier), and you see “N physics bodies were not sent because this server (NPBridge below 2.1.0) doesn’t know them — update the server plugin and reconnect”. File export includes them and shows the warning “N physics bodies need server NPBridge 2.1.0 or later (older servers keep these actors as data only)”
Server settingsscene.runtime.physics-max-bodies in config.yml (maximum moving bodies per scene, default 64, maximum 64) · scene.runtime.physics-budget-ms (time budget for one tick’s stepping, default 2.0)
Permissionnpscene.physics.interact (hit, pick up, throw; default everyone)
Block collision shapesThe editor uses a table of vanilla collision shapes (walls and fences 1.5 high, glass panes, half blocks, carpets, snow layers …; blocks not in the table are full cells), and the server uses each block’s real collision shape. If they differ, the server leaves a scene warning
MessageMeaning
“There are no moving physics bodies”No body has Body set to Dynamic, so the preview does not start
“Physics is already running during play”The physics preview is not used while playing
“Rendering — try again after it finishes or is cancelled”The preview does not start while a sequence video render is running
“The editor preview · ▶ Play never break blocks (they only report which would break)”Note under the world settings fields