mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
change raycasting
This commit is contained in:
parent
0fb2107265
commit
98b27813b7
@ -67,6 +67,8 @@ std::pair<std::string, float> MWScene::getFacedHandle (MWWorld::World& world)
|
||||
Ray centerRay = getCamera()->getCameraToViewportRay(
|
||||
getViewport()->getWidth()/2,
|
||||
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user