Skip to content

Instantly share code, notes, and snippets.

@danfinlay
Created February 17, 2013 23:45
Show Gist options
  • Save danfinlay/4974178 to your computer and use it in GitHub Desktop.
Save danfinlay/4974178 to your computer and use it in GitHub Desktop.
There is a problem when I try to use my voxel-zigfu kinect puppetry with voxel-engine. This character isn't even visible.
var createGame = require('voxel-engine')
var voxel = require('voxel')
var texturePath = require('painterly-textures')(__dirname)
var game = createGame({
startingPosition: [0, 200, 0],
generate: voxel.generator['Valley'],
chunkDistance: 2,
texturePath: texturePath,
worldOrigin: [0, 0, 0],
controls: { discreteFire: true }
})
window.game = game // for debugging
var container = document.querySelector('#container')
game.appendTo(container)
//Giving navigation to the game using voxel-player:
var player = require('voxel-player')
var createPlayer = player(game)
window.substack = createPlayer('substack.png')
substack.position.set(5,200,5)
substack.possess()
//Attempting to combine voxel-zigfu with the game:
var kinect = require('voxel-zigfu')
var skin = require('../minecraft-skin')
window.dan = skin(game.THREE, 'danf.png')
dan.mesh.position.y = 60
game.scene.add(dan.createPlayerObject())
kinect.puppeteer(dan)
//I can actually get it to appear but not move like this:
//game.addItem(dan)
var currentMaterial = 1
module.exports = game
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment