MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / RayCast

Method RayCast

Source/Engine/Terrain/TerrainPatch.cpp:2000–2009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1998}
1999
2000bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, float maxDistance) const
2001{
2002 CHECK_RETURN_DEBUG(direction.IsNormalized(), false);
2003 if (_physicsShape == nullptr)
2004 return false;
2005 Vector3 shapePos;
2006 Quaternion shapeRot;
2007 PhysicsBackend::GetShapePose(_physicsShape, shapePos, shapeRot);
2008 return PhysicsBackend::RayCastShape(_physicsShape, shapePos, shapeRot, origin, direction, resultHitDistance, maxDistance);
2009}
2010
2011bool TerrainPatch::RayCast(const Vector3& origin, const Vector3& direction, float& resultHitDistance, Vector3& resultHitNormal, float maxDistance) const
2012{

Callers

nothing calls this directly

Calls 1

IsNormalizedMethod · 0.45

Tested by

no test coverage detected