Input forwarding
Updated: Nov 18, 2026
Input forwarding eliminates the need to constantly put on and take off your headset during development. Move around your scene, click and drag on panels, and grab objects in your 3D scene using keyboard and mouse controls.
Here’s a quick example of what input forwarding looks like in action:
Input forwarding runs in the desktop cast window, so you need a way to start a cast. The
Meta VR Plugin for Android Studio and
Meta VR CLI are alternatives here. Each one stands on its own, and both start the same cast client with the same features, so everything after the launch step is the same whichever you choose.
Sample projects already include this setup.
In the [versions] block of your libs.versions.toml file, add a variable called spatialSDK if there isn’t one already.
In the [libraries] block, add the cast input forward feature.
meta-spatial-sdk-castinputforward = { group = "com.meta.spatial", name = "meta-spatial-sdk-castinputforward", version.ref = "spatialsdk" }
In the dependencies {} block of app/build.gradle.kts, add the new dependency.
dependencies {
implementation(libs.meta.spatial.sdk.castinputforward)
}
In your app’s main activity file, add the CastInputForwardFeature to the registerFeatures() method.
override fun registerFeatures(): List<SpatialFeature> {
var features = ...
if (BuildConfig.DEBUG) {
features.add(CastInputForwardFeature(this))
}
return features
}
CastInputForwardFeature should never be included in release builds. The BuildConfig.DEBUG check ensures this feature only runs during development.
Connect your headset
Confirm the headset is attached. In Android Studio, it appears in the device dropdown in the toolbar. From a terminal, metavr device list prints the ID of each attached device.
Start casting
Choose either route. Both open the same cast window.
- Android Studio: in the Meta VR tool window, select Cast on the Cast device row.
Meta VR CLI: start the cast from a terminal.
metavr casting status reports whether the cast client is running, and metavr casting stop ends it.
Run your app
Make sure that you’re building a DEBUG flavor.
Select the input forwarding icon while inside of your app to enable input forwarding.
Casting with input forwarding only works with your resolution set to Original (1:1). It will not work correctly if your resolution is set to Cropped (16:9) or Cinematic (16:9).
Note: The white cursor reflects the input forwarding controller’s interaction with the scene. This may not line up perfectly with where your mouse cursor is on the Cast window.
| Key | Action |
|---|
W / Up Arrow | Move forward |
S / Down Arrow | Move backward |
A | Move left |
D | Move right |
Q | Move up |
E | Move down |
Left Arrow | Rotate left |
Right Arrow | Rotate right |
Shift | Sprint |
Left mouse button | Click |
Ctrl + Left mouse button / Right mouse button | Hold to rotate view |
Space + Left mouse button | Grab |
Verify the following:
- You are casting, and the cast window shows the input forwarding icon.
- You have followed all the steps to include input forwarding to your app.
- It must be added per-app.
CastInputForwardFeature should be one of the features you return in registerFeatures()
Your app is in general input forwarding mode if you experience slow movement, can leave the boundary, and see no input forwarding cursor. Spatial SDK needs a specific input forwarding mode to connect to your cast window.
Fix this by restarting your app and selecting the input forward icon in your Cast window again. In rare cases you may need to restart your Cast window as well.
Make sure you have added the
<uses-native-library> tag for
libossdk, as described in the
Adding input forwarding section.