Configuring XR Interaction Toolkit for Smooth VR Mechanics

Our video game development company runs independent projects, jointly creates games with the client and provides additional operational services. Expertise of our team allows us to cover all gaming platforms and develop an amazing product that matches the customer’s vision and players preferences.

From immersive apps to game worlds and 3D scenes

Our dedicated team for VR/AR/MR development, Unity production and 3D modeling & animation — with its own case studies and capability decks.

Visit the dedicated studio
Showing 1 of 1All 242 services
Configuring XR Interaction Toolkit for Smooth VR Mechanics
Medium
~3-5 days
Frequently Asked Questions

Our competencies

What are the stages of Game Development?

Latest works

  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    1386
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    926
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    544
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    591

Configuring XR Interaction Toolkit for Smooth VR Mechanics

When launching a VR project on Unity with XR Interaction Toolkit, you face unstable interactions, dropped batch rate, and incorrect object grabbing. Our team of engineers with 5+ years of experienced in gamedev helps configure XRIT so that mechanics are smooth and performant. Get a consultation on XRIT setup — it can save up to 2 weeks on the integration stage and reduce total project costs by 15–25%, translating to savings of $1,200–$5,000 depending on project scope.

Choosing the Right XRIT Version to Avoid Hidden Issues

XRIT 2.x and 3.x are essentially different systems. Version 3.x rewrote input handling from Legacy Input Manager to the new Input System, changed the architecture of Interactor/Interactable, and added the Affordance System for visual states. If a project started on 2.5 but documentation was read for 3.0, some API simply does not exist or works differently.

Before starting configuration: pin the XRIT version in manifest.json, ensure the Input System Package (com.unity.inputsystem) is version ≥ 1.6, and that XR Plugin Management is configured for target platforms. Without explicitly setting the OpenXR Loader or Oculus XR Plugin in XR Plug-in Management, many XRIT components simply won't initialize without a clear error message.

Common XR Origin Positioning Problems

The root of the entire VR scene is XR Origin. Incorrect configuration causes 80% of positioning and scale issues.

Tracking Origin Mode must match the game type. Floor — for room-scale, the player stands on the floor, Y=0 is the real floor. Device — for stationary, the origin is where the headset starts. If chosen incorrectly, the player avatar will be either under the floor or in the air — and this is not a bug in gameplay code, but a single setting in XROrigin.RequestedTrackingOriginMode.

Camera Floor Offset Object — an intermediate object between XR Origin and Camera Offset. Its Y-position in Device mode sets the virtual eye height (usually 1.5–1.8 m). In Floor mode, its Y = 0.

Hierarchy structure: XR Origin → Camera Offset → Main Camera (headset) + LeftHand Controller + RightHand Controller. Adding game objects directly to Camera Offset is bad practice: they will move with the head. World-space elements should be in world space, not as children of XR Origin.

Verifying Attach Transform in Three Steps

  1. Step 1: Create an empty child object on the XRGrabInteractable, place it at the grip point (e.g., sword handle).
  2. Step 2: Drag this object into the Attach Transform field of the XRGrabInteractable component.
  3. Step 3: Ensure that when grabbed, the object ends up in the correct position relative to the controller. If not, adjust the local coordinates of the Attach Transform.

Configuring XRGrabInteractable for Specific Mechanics

The standard XRGrabInteractable works out of the box for simple cases. For non-standard ones, you need to understand its internals.

Movement Type determines how the object follows the hand:

  • Instantaneous — teleports to the attach point position every frame. No physics, no smoothness. Suitable for UI elements.
  • Kinematic — Rigidbody moves via MovePosition/MoveRotation. Correctly interacts with other Rigidbodies and colliders, but may pass through static colliders at high speed.
  • VelocityTracking — the object receives velocity that pulls it toward the target position. The most "physical" option, best for objects that may be blocked by others. Requires fine-tuning of TrackingSpeed and TrackingRotationSpeed.

For weapons, VelocityTracking with TrackingSpeed = 12–15 and separate throw handling via the SelectExited event + Rigidbody.AddForce using velocity from the last 5 frames (current controller velocity gives inaccurate throws).

Attach Transform — a critical parameter often left unconfigured. Without an explicit Attach Transform, the object attaches to the controller position — this is correct only if the grip should be at the base. For a sword, the attach point should be at the handle; for a pistol, at the grip with the correct angle. Create an empty child object with the needed position and rotation, assign it to the Attach Transform field.

Socket Interactor for Placing Objects

XRSocketInteractor — for mechanics like "put object on shelf/in slot". Common issues: object jumps if Snap Threshold is too large (recommend 0.1–0.2 m), or snap doesn't occur if Interactor Layer Mask doesn't match the Interactable's tags. Check: on XRSocketInteractor, Interaction Layer Mask must include layers of all objects that can be placed in the slot.

For complex mechanics (weapons with modules, assembly puzzles), the standard Socket is often insufficient — we write a custom Interactor inheriting from XRBaseInteractor, overriding CanHover and CanSelect with additional conditions (object type, orientation, state).

Ray Interactor for UI and Distant Interaction

XRRayInteractor + XRUIInputModule for interacting with World Space Canvas. Typical problem: the ray passes through UI elements or triggers elements behind others. Solution: correct sorting layer on Canvas and Blocked Physics Raycasts = true on GraphicRaycaster.

For game objects, XRRayInteractor paired with XRInteractableSnapVolume provides "magnetism" of the ray toward the object's center when close — improving accuracy for small objects without changing colliders.

What's Included in the Work

We provide:

  • Analysis of existing XRIT configuration and identification of bottlenecks
  • XR Origin setup tailored to your use case (room-scale / stationary)
  • Configuration of XRGrabInteractable, XRSocketInteractor, XRRayInteractor for your mechanics
  • Custom Interactors for unique mechanics (e.g., weapons, puzzles)
  • Performance optimization: reduce draw calls by 20–30%, configure LODs and culling
  • Documentation of settings and access to custom prefabs
  • Team training session (up to 4 hours)
  • Support during integration stage (2 weeks included)
Stage Estimated Duration Estimated Cost
Basic XRIT setup (grab + ray + socket) 3–5 days $800–$1,500
Custom Interactor/Interactable for mechanics 1–2 weeks $1,500–$4,000
Full interaction system for the game 3–6 weeks $4,000–$10,000

Our guaranteed process ensures transparent pricing and fixed deadlines. Proper configuration saves up to 2 weeks on the integration stage, reducing total project costs by 15–25% according to our client data.

Why Trust Professionals with XRIT Configuration?

Our track record of over 20 successful VR projects confirms: a properly configured XRIT works 2–3 times faster than a typical setup. We use proven practices: pinned package versions, correct scene hierarchy, and tuned physics parameters. Our certified Unity developers follow an internal quality checklist, guaranteeing stable interactions across target platforms.

If you want to get a stable interaction system — contact us for a consultation. We will evaluate your project and propose an optimal configuration that saves time and resources.

According to the XR Interaction Toolkit documentation (https://docs.unity3d.com/Packages/[email protected]/manual/index.html), correct scene hierarchy and Attach Transform setup are critical for proper operation.