build and activation fix

actorid
Marc Zinnschlag 14 years ago
parent 21c224af25
commit 647e88003e

@ -182,6 +182,8 @@ set(OENGINE_BULLET
${LIBDIR}/openengine/bullet/CMotionState.h
${LIBDIR}/openengine/bullet/physic.cpp
${LIBDIR}/openengine/bullet/physic.hpp
${LIBDIR}/openengine/bullet/BulletShapeLoader.cpp
${LIBDIR}/openengine/bullet/BulletShapeLoader.h
)
# Sound setup

@ -69,44 +69,8 @@ std::pair<std::string, float> MWScene::getFacedHandle (MWWorld::World& world)
getViewport()->getHeight()/2);
//let's avoid the capsule shape of the player.
centerRay.setOrigin(centerRay.getOrigin() + 20*centerRay.getDirection());
btVector3 from(centerRay.getOrigin().x,centerRay.getOrigin().y,centerRay.getOrigin().z);
btVector3 to(centerRay.getPoint(1000).x,centerRay.getPoint(1000).x,centerRay.getPoint(1000).x);
// get all objects touched by the ray
/*getRaySceneQuery()->setRay (centerRay );
RaySceneQueryResult &result = getRaySceneQuery()->execute();
RaySceneQueryResult::iterator nearest = result.end();
for (RaySceneQueryResult::iterator itr = result.begin();
itr != result.end(); itr++ )
{
// there seem to be omnipresent objects like the caelum sky dom,
// the distance of these objects is always 0 so this if excludes these
if ( itr->movable && itr->distance >= 0.1)
{
// horrible hack to exclude statics. this must be removed as soon as a replacement for the
// AABB raycasting is implemented (we should not ignore statics)
MWWorld::Ptr ptr = world.getPtrViaHandle (itr->movable->getParentSceneNode()->getName());
if (ptr.getType()==typeid (ESM::Static))
break;
if ( nearest == result.end() ) //if no object is set
{
nearest = itr;
}
else if ( itr->distance < nearest->distance )
{
nearest = itr;
}
}
}
if ( nearest != result.end() )
{
handle = nearest->movable->getParentSceneNode()->getName();
distance = nearest->distance;
}*/
btVector3 from(centerRay.getOrigin().x,-centerRay.getOrigin().z,centerRay.getOrigin().y);
btVector3 to(centerRay.getPoint(1000).x,-centerRay.getPoint(1000).z,centerRay.getPoint(1000).y);
return eng->rayTest(from,to);
}

@ -1 +1 @@
Subproject commit 79fba7e77ed81f0e814d603315b1b4e5a1f4f309
Subproject commit 25b3cf935967beb5011419b6d3911fca05863743
Loading…
Cancel
Save