maxogden/voxel-highlight — pull request #5 by theoxylo (2013-03-01 22:12:37+00:00)
Title: fixed raycast bug, removed legacy voxel-engine 0.3.6 support

Now using simplified raycast approach instead of Game.prototype.raycast:

```
// cheap raycast "lite":
var stepDistance = 0.1
var distanceChecked = 0
var maxDistance = this.opts.distance || 10
this.stepPosition.copy(this.game.cameraPosition())
this.stepSegment.copy(this.game.cameraVector()).multiplyScalar(stepDistance)
while (distanceChecked < maxDistance && !hit) {
distanceChecked += stepDistance
this.stepPosition.addSelf(this.stepSegment)
if (this.game.voxels.voxelAtPosition(this.stepPosition)) {
var hit = this.stepPosition
}
}```

Also, using voxel size of 1 when calculating positions