mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 22:41:32 +00:00
Merge branch '5624' into 'master'
Skip raycasting for zero-length rays Closes #5624 See merge request OpenMW/openmw!316
This commit is contained in:
commit
4b95cb8660
1 changed files with 2 additions and 0 deletions
|
@ -264,6 +264,8 @@ namespace MWPhysics
|
|||
|
||||
RayCastingResult PhysicsSystem::castRay(const osg::Vec3f &from, const osg::Vec3f &to, const MWWorld::ConstPtr& ignore, std::vector<MWWorld::Ptr> targets, int mask, int group) const
|
||||
{
|
||||
if (from == to)
|
||||
return RayCastingResult { false };
|
||||
btVector3 btFrom = Misc::Convert::toBullet(from);
|
||||
btVector3 btTo = Misc::Convert::toBullet(to);
|
||||
|
||||
|
|
Loading…
Reference in a new issue