Altspace tool

Flight Tool

A pen that flies you anywhere in 3D. Grab it, hold the trigger and move your hand: you fly the way you pull, faster the further you pull. Made for SideQuest / AltspaceVR worlds.

It works at any level (it doesn't use bird flight), in VR and on PC. Open flight-tool.firer.at as a space in Altspace to try it.

How to fly

In VR

  1. Grab the pen with grip.
  2. Hold the trigger and move your hand. A line runs from where you pressed the trigger to the pen's tip, and you fly along it: up, down, left, right, forward, back, or any mix. The further from the start, the faster.
  3. Hover by holding the pen still at the start point. Bring it back towards the start to slow down.
  4. Let go of the trigger and you fall as normal, keeping the speed you had.
  5. Turning (optional): press A or X while holding the pen to switch twist-to-turn on (an orange band appears on the pen) or off. While it's on and you're flying, twist the pen clockwise to turn right and anticlockwise to turn left, a step at a time.

On PC

  1. Click the pen to pick it up. While you hold it you hover.
  2. Arrow keys fly you where you're looking. Space flies up and Tab flies down.
  3. Hold 3 to fly by the pen's position like in VR: move the mouse, and scroll to push the pen away or pull it in.
  4. Drop the pen to land.

A pen waits where the world's builder put it, with a Grab the pen to fly label over it. The first time you pick one up, a message shows the controls for VR or PC.

Each player gets a pen of their own: when you pick one up, a new one appears in its place for the next person. Your pen stays where you let go of it, and goes away 30 seconds later. A world can instead make it one shared pen that everyone sees (sync), which goes back to its spot 30 seconds after it's dropped.

1. Pick how you build your world

Flight Tool 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.

Recommended

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 pen's spot in the Scene view.

Go to the Unity steps
No Unity needed

I 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 steps

2a. Add it in Unity

You need a Unity project with the Altspace Creator SDK already set up, and your world's scene open.

  1. Make an empty object. In the top menu choose GameObject › Create Empty. Rename it to Flight Tool so you can find it later (the object's name doesn't matter, only the slug does).
  2. 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 0 and Rotation to 0 0 0. Why: you don't move the pen by moving this object. You move it with the snippet's own position setting (step 6). If the object (or anything it's inside) isn't at 0 0 0, the SDK's gizmo won't line up with where the pen really appears.
  3. Add the Snippet component. Click Add Component, type Snippet in the search box, and pick BS › Snippet.
  4. 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.html for you. After a moment the Inspector shows the title Flight Tool and a list of settings. If nothing happens, click Refresh from server.
  5. 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.
  6. Place and configure it. Drag the gizmo handle in the Scene view to choose where the pen waits, and change the other settings in the Inspector. They're all listed under Settings.
  7. Upload your world the same way you always do, then join it in Altspace and pick up the pen.

More pens: add Flight Tool once, then give it more spots. Click Open index.html in the Snippet component and add tool-2-position="5 1 0", tool-3-position="0 20 4" and so on to the snippet. Each one is another pen, with the same settings. Use as many as you like.

2b. Add it on the website

  1. Open your world for editing on altvr.app and go to the Snippets section.
  2. Find Flight Tool. Set the list to show All snippets, then search for Flight Tool (or scroll to it) and open it.
  3. 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).
  4. Paste it in the right place. If your HTML has these two lines, paste between them:
    <!-- snippet section -->
       paste here
    <!-- end snippet section -->
    If it doesn't have them, paste it just before </body>.
  5. Change the settings by editing the values in quotes in the pasted code, for example position="0 1 2". For more pens, add tool-2-position="5 1 0", tool-3-position="0 20 4" and so on, as many as you like.
  6. Save, then join your world and pick up the pen.

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 &amp;. 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.

Full snippet code
<!-- snippet section -->
<bs-snippet name="fly" title="Flight Tool" single="true"
  description="A pen that flies you anywhere in 3D: hold the trigger and move your hand. Works at any level, in VR and on PC."
  script="https://flight-tool.firer.at/snippet.js"
  position="0 1 1"
  sync="false"
  max-speed="10"
  dead-zone="0.02"
  full-range="0.3"
  response="6"
  key-speed="5"
  turning="false"
  turn-step="30"
  turn-twist="25"
  turn-repeat="0.35"
  eye-height="1.6"
  return-after="30"
  help="true"
  label="true"
  bundle-base="">
  <bs-gizmo type="position" attribute="position"/>
  <bs-gizmo type="box" attribute="position" size="0.04 0.18 0.04"/>
</bs-snippet>
<!-- end snippet section -->

Settings

All optional. An empty or missing setting uses the default.

SettingDefaultWhat it does
position0 1 1Where the pen waits (a Unity world position), and where it goes back to.
tool-2-position, tool-3-position, ...(none)More pens, each one x y z. Add as many as you like; they all use the settings below.
syncfalsetrue makes each spot one shared pen that everyone sees in the holder's hand. false gives every player a pen of their own (others don't see it).
max-speed10Top speed in metres per second.
dead-zone0.02Metres round the start point that don't move you, so a shaky hand still hovers.
full-range0.3How far past the dead zone (in metres) you move the pen for top speed. Speed grows with the square of the distance, so small movements give fine control.
response6How quickly your speed follows the pen. Higher feels snappier, lower floatier.
key-speed5Speed in metres per second for the PC keys (arrow keys, Space, Tab).
turningfalsetrue starts with twist-to-turn on. Players can still toggle it with A / X.
turn-step30Degrees per turn step.
turn-twist25How far (in degrees) the pen has to be twisted before you turn.
turn-repeat0.35Seconds between turn steps while the pen stays twisted.
eye-height1.6Metres from eyes to feet. A turn step moves you by your feet, so this keeps you at the same height.
return-after30Seconds after it's dropped before the pen goes home: a shared pen moves back to position, a pen of your own goes away (a new one already waits there). 0 leaves it where it was dropped.
helptruefalse skips the message with the controls the first time someone picks up a pen.
labeltruefalse hides the Grab the pen to fly label over the pen's spot.
bundle-base(empty)A folder URL to load the pen's bundles from instead of this site.

Good to know

  • Only the person flying sees the line and the start point. With sync="true" everyone sees the pen too; otherwise each player only sees their own.
  • A pen that's put down stays exactly where you let go: it doesn't fall or get knocked away.
  • The pen pushes you rather than teleporting you, so walls and floors still stop you.
  • Twist-to-turn works by small teleports. If your play area is off-centre, each step can shift you slightly.