mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-16 16:20:53 +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
@ -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…
x
Reference in New Issue
Block a user