All videos · All how-to videos

How to move a fixed body while physics runs in R3

0:50 · 2026-10-29

In the R3 editor: add a Code component, press Edit Code and add two lines to update that move the lift, a fixed body, up and down. Press Save, start Physics, then start Code: the lift moves while physics runs, and whatever rests on it moves with it. Good to know: things sink slightly into a moving Fixed body, because Fixed bodies aren't meant to move. To carry things cleanly, use a Kinematic body. Narration: AI voice.

Watch on YouTube

Chapters

  1. 0:00 Create: add a Code component
  2. 0:07 Open the script and press Edit Code
  3. 0:12 Two lines: move the lift up and down
  4. 0:17 Save, and close the editor
  5. 0:20 Start Physics: everything settles
  6. 0:25 Start Code: the lift moves
  7. 0:33 Good to know: use a Kinematic body

Transcript

0:02 Open the menu, then Create, and add a Code component.

0:07 In the Inspector, open the new script, and press Edit Code.

0:12 In update, move the lift up and down. It's a fixed body.

0:17 Press Save, and close the editor.

0:20 Hide the panel, and start Physics. Everything settles on the lift.

0:25 Now start Code. The lift moves while physics runs, and whatever rests on it moves with it.

0:33 Things sink slightly into a moving Fixed body, because Fixed bodies aren't meant to move. To carry things cleanly, use a Kinematic body: see How to make a moving platform.