Latest 0.0.5
License MIT
Platforms ios 11.0
Dependencies GVRKit


Combines Google Cardboard with SceneKit Rendering and ARKit World Tracking.
Combining ARKit with Google Cardboard enables six degrees of freedom (rotation and translation) in VR:



GVRSCNRenderer can be installed as a dependency using CocoaPods:

target 'Your-App-Name' do
    pod 'GVRSCNRenderer'


Builds on top of GVRRenderer from GVRKit, which is part of the Google VR SDK for iOS.

Basic Setup

import GVRKit
import GVRSCNRenderer

// Create scene:
let scene: SCNScene = ...

// For SceneKit Rendering without world tracking:
let renderer = GVRSCNRenderer(scene: scene)

// For 6DOF Tracking:
let renderer = GVRSCNARTrackingRenderer(scene: scene)

// Create Cardboard view and pass renderer
let view = GVRRendererView(renderer: renderer)

Event Handling

Cardboard trigger events can be handled by the interaction delegate:

renderer.interactionDelegate = yourEventHandler

extension YourEventHandler: GVRSCNInteractionDelegate {
    func didTrigger(_ renderer: GVRSCNRenderer, headTransform: SCNMatrix4) {
        // Handle trigger event

Render Loop Customization

The render loop can be customized using a SCNSceneRendererDelegate:

renderer.rendererDelegate = yourRendererDelegate

extension YourRendererDelegate: SCNSceneRendererDelegate {
    // ...

Showing Tracking Features

Tracking features can be shown to signal nearby objects in the real world to the user to avoid collisions (GVRSCNARTrackingRenderer only):

renderer.showsTrackingFeatures = true

Customizing feature indicators:

// Set tracking feature size in meters (e.g. 0.001 == 1mm)
renderer.trackingFeatureSize = ...

// Set tracking feature material
renderer.trackingFeatureMaterial = ...

3D Model in demo GIF: Rempart Walls scenery 1 – Fougères castle by noxfcna is licensed under CC Attribution

Latest podspec

    "name": "GVRSCNRenderer",
    "version": "0.0.5",
    "license": "MIT",
    "summary": "Enables SceneKit Rendering and ARKit 6DOF Tracking for Google Cardboard.",
    "homepage": "",
    "authors": "Palle Klewitz",
    "source": {
        "git": "",
        "tag": "0.0.5"
    "platforms": {
        "ios": "11.0"
    "swift_version": "4.0",
    "source_files": "GVRSCNRenderer/*.swift",
    "dependencies": {
        "GVRKit": []
    "static_framework": true

Pin It on Pinterest

Share This