I'm just starting out with both Ogre and PolyVox. My application consists almost entirely of copypasta. Below is the meat of my mouseMoved function. Looks familiar no

And of course as I type this I have spotted my error. (note the extra pos.z in the start initializer)
Well, this was the outcome I was looking for so thanks

I just tested the fix and it works perfectly.
Cheers,
Charlie
Code:
Ogre::Vector3 pos = mCamera->getPosition();
Ogre::Vector3 dir = mCamera->getDirection();
// Find the voxel we are looking at.
PolyVox::Vector3DFloat start(pos.x,pos.z,pos.z);
PolyVox::Vector3DFloat direction(dir.x, dir.y, dir.z);
std::cout << start << std::endl;
std::cout << direction << std::endl;
direction.normalise();
direction *= 10000.0f; //Casts ray of length 1000
PolyVox::RaycastResult raycastResult;
PolyVox::Raycast<PolyVox::SimpleVolume, PolyVox::MaterialDensityPair44>
raycast(mSphereVox, start, direction, raycastResult);
raycast.execute();
if(raycastResult.foundIntersection) {
mSceneMgr->getSceneNode("MarkerNode")->
setPosition(raycastResult.intersectionVoxel.getX(),
raycastResult.intersectionVoxel.getY(),
raycastResult.intersectionVoxel.getZ());
std::cout << raycastResult.intersectionVoxel << std::endl;
}
std::cout << std::endl;