From the documentation (pg332,Notes On The Cast Ray Function) "We provide both an input hkpShapeRayCastInputstructure and a collector hkpShapeRayCastOutput structure." I'm trying to limit the area that is raycasted.I'm using a hkpAabbPhantom to do this. Its constructed like this. hkAabb info; info.m_min = hkVector4( -mPhantomSide, -mPhantomSide, -mPhantomSide); info.m_max = hkVector4( mPhantomSide, mPhantomSide, mPhantomSide) ; mPhantomShape = new hkpAabbPhantom(info); I then calculate the ray, and try and call mPhantomShape->castRay(), only to be told there are no overloads for the arguments.It expects the worldInputs and outputs. mRay = mCameraSystem->GetCamera()->getCameraToViewportRay(mCrosshairX, mCrosshairY); direction = mRay.getDirection(); endItem = direction * mPickupRayDistance; hkpShapeRayCastInput input; input.m_from.setTransformedInversePos( mCharacterController->GetHavokCharacter()->getRigidBody()->getTransform(), UtilityFunctions::toHKVec(start)); input.m_to.setTransformedInversePos( mCharacterController->GetHavokCharacter()->getRigidBody()->getTransform(), UtilityFunctions::toHKVec(endItem)); hkpShapeRayCastOutput output; if(mItem == NULL) { mPhantomShape->castRay(input,output); I'm obviously doing something silly. What is it?
hkpAabbPhantom castRay wont accept hkpShapeRayCastInput
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.



