How to fly
In VR
- Click the broom to sit on it.
- Hold its handles with one hand or both: lift them to climb, push them down to dive, move them left or right to turn. The left stick steers too: forward dives, back climbs, left and right turn. The broom tilts you with it, and lifting or pushing rises or sinks you even when you're still.
- Push the right stick up to speed up, down to slow down. Click it in to stop.
- Let go of the handles to hover.
- Press B (or jump) to get off.
On PC
- Click the broom to sit on it.
- W speeds up, S slows down, A and D turn, E climbs, and Q dives (straight up or down when you're still). The handles work too.
- Press Space to get off.
A broom waits where the world's builder put it, with a Click the broom to ride label over it. The first time you sit on one, a message shows the controls for VR or PC.
The broom isn't shared: everyone has it to themselves, and others see you flying but not the broom. After you get off, it goes back to its spot 15 seconds later.
1. Pick how you build your world
Flight Broom is an Altspace snippet: a ready-made piece you drop into your world. Its name (the "slug") is always:
Type it exactly like that (all lowercase). Pick the way you build your world and follow that section below.
I build my world in Unity
You use the Altspace Creator SDK in Unity. You get the settings in the Inspector and can drag the broom's spot in the Scene view.
Go to the Unity stepsI edit my world on the website
You edit your world on altvr.app in your browser. You copy the snippet from the Snippets section (or below) and paste it into your world's HTML.
Go to the website steps2a. Add it in Unity
You need a Unity project with the Altspace Creator SDK already set up, and your world's scene open.
- Make an empty object. In the top menu choose . Rename it to
Flight Broomso you can find it later (the object's name doesn't matter, only the slug does). - Put it at the middle of the world. With the new object selected, look at Transform in the Inspector and set Position to
0 0 0and Rotation to0 0 0. Why: you don't move the broom by moving this object. You move it with the snippet's ownpositionsetting (step 6). If the object (or anything it's inside) isn't at0 0 0, the SDK's gizmo won't line up with where the broom really appears. - Add the Snippet component. Click , type
Snippetin the search box, and pick . - Type the slug and press Enter. In the Snippet's Slug box type and press Enter (the box only takes it after Enter or clicking somewhere else).
It downloads the snippet and adds it to your world's
Assets/WebRoot/index.htmlfor you. After a moment the Inspector shows the title Flight Broom and a list of settings. If nothing happens, click Refresh from server. - Save the scene. Press Ctrl + S (Windows / Linux) or Cmd + S (Mac).
Do this every time you add or remove a snippet. Closing Unity without saving is the main way extra copies of the snippet end up in
index.html. - Place and configure it. Drag the gizmo handle in the Scene view to choose where the broom waits, and change the other settings in the Inspector. They're all listed under Settings.
- Upload your world the same way you always do, then join it in Altspace and click the broom to ride.
More brooms: add Flight Broom once, then give it more spots. Click Open index.html in the Snippet component and add broom-2-position="5 0.8 0", broom-3-position="0 20 4" and so on to the snippet. Each one is another broom, with the same settings. Use as many as you like. Add broom-2-seat-turn="90" to ride broom 2 side-saddle.
2b. Add it on the website
- Open your world for editing on altvr.app and go to the Snippets section.
- Find Flight Broom. Set the list to show All snippets, then search for
Flight Broom(or scroll to it) and open it. - Copy it. Click Copy & open index.html. This copies the snippet's code and opens your world's HTML (or copy the full snippet code below).
- Paste it in the right place. If your HTML has these two lines, paste between them:
If it doesn't have them, paste it just before<!-- snippet section --> paste here <!-- end snippet section --></body>. - Change the settings by editing the values in quotes in the pasted code, for example
position="0 0.8 2". For more brooms, addbroom-2-position="5 0.8 0",broom-3-position="0 20 4"and so on, as many as you like. - Save, then join your world and click the broom to ride.
Keep the code tidy. Every value needs quotes around it (max-speed="12", not max-speed=12), and a & in any link must be written as &. Unity reads this part strictly, and one mistake can break the whole snippet section.
The full snippet code
This is everything the snippet adds, with every setting at its default. Click the code to copy it.
<!-- snippet section -->
<bs-snippet name="broom" title="Flight Broom" single="true"
description="A broomstick you sit on and fly: steer it by its handles, the right stick sets the speed."
script="https://flight-broom.firer.at/snippet.js"
position="0 0.8 -2"
yaw="0"
max-speed="12"
accel="4"
turn-speed="90"
max-pitch="50"
stick-angle="25"
seat-turn="0"
climb-speed="3"
tilt="1"
collide="true"
steer-range="0.2"
dead-zone="0.03"
response="3"
pitch-ease="3"
return-after="15"
help="true"
label="true"
label-text="Click the broom to ride"
bundle-base="">
<bs-gizmo type="position" attribute="position"/>
<bs-gizmo type="box" attribute="position" size="0.5 0.16 0.5"/>
</bs-snippet>
<!-- end snippet section -->
Settings
All optional. An empty or missing setting uses the default.
| Setting | Default | What it does |
|---|---|---|
position | 0 0.8 2 | Where the broom waits (a Unity world position, the top of its saddle), and where it goes back to. |
broom-2-position, broom-3-position, ... | (none) | More brooms, each one x y z. Add as many as you like; they all use the settings below. |
broom-2-seat-turn, broom-3-seat-turn, ... | seat-turn | seat-turn for that broom only, for example broom-2-seat-turn="90" for a side-saddle broom. |
yaw | 0 | Which way the brooms face, in degrees about up. |
max-speed | 12 | Top speed in metres per second. |
accel | 4 | Metres per second gained or lost per second with the right stick (or W / S). |
turn-speed | 90 | Degrees per second with the handles right over to the side. |
max-pitch | 50 | Degrees the broom noses up or down with the handles right up or down. |
stick-angle | 25 | Degrees the stick points up where it rests. Holding it there is level flight. |
seat-turn | 0 | Degrees the seat (and you) turn from the broom. 90 or -90 rides side-saddle; the handles stay at the broom's front. |
climb-speed | 3 | Metres per second straight up or down with the handles right up or down (or E / Q), on top of the speed, so you can rise or sink on the spot. |
tilt | 1 | How much of the nose up or down tilts you on the seat: 0 keeps you upright, 1 tilts you all the way with the broom. |
collide | true | false lets the broom fly through walls, floors and other solid things. |
steer-range | 0.2 | Metres past the dead zone for a full turn or climb. |
dead-zone | 0.03 | Metres round where the handles rest that don't steer. |
response | 3 | How quickly your speed follows, per second. Higher feels snappier, lower floatier. |
pitch-ease | 3 | How quickly the broom noses up and down, per second. |
return-after | 15 | Seconds after you get off before the broom goes back. false (or 0): brooms stay where you left them. |
help | true | false skips the message with the controls the first time someone sits on a broom. |
label | true | false hides the Click the broom to ride label over the broom's spot. |
label-text | Click the broom to ride | What the label over the brooms says. No double quotes. |
broom-2-label-text, broom-3-label-text, ... | label-text | label-text for that broom only. |
bundle-base | (empty) | A folder URL to load the broom's bundles from instead of this site. |
Good to know
- The broom isn't shared: everyone has it to themselves, and others see you flying but not the broom.
- Letting go of the handles leaves you hovering in place until you steer again or get off.
- The broom stops at walls and floors, sliding along them. Set
collide="false"to fly through them.