mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 03:15:34 +00:00
change raycasting
This commit is contained in:
parent
0fb2107265
commit
98b27813b7
1 changed files with 2 additions and 0 deletions
|
@ -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…
Reference in a new issue