DebugDraw extra

fixes
ray direction was dictating the length of ray
now ray is normalized and multiplied by length
added default vaule for
Color& color to be Color::White
[info] c# because
Color color = Color.White
is not valid think to do on c# side the default value is not genereted
[to do] generate extra overload binding in c#
This commit is contained in:
NoriteSC
2023-09-12 10:59:07 +02:00
parent 762960bee1
commit 3bfa37019e
2 changed files with 19 additions and 3 deletions

View File

@@ -920,9 +920,14 @@ void DebugDraw::DrawActors(Actor** selectedActors, int32 selectedActorsCount, bo
}
}
void DebugDraw::DrawRay(const Vector3& origin, const Vector3& direction, const Color& color, float duration, bool depthTest)
void DebugDraw::DrawRay(const Vector3& origin, const Vector3& direction, Color& color, float length, float duration, bool depthTest)
{
DrawLine(origin, origin + direction, color, duration, depthTest);
DrawLine(origin, origin + (direction.GetNormalized() * length), color, duration, depthTest);
}
void DebugDraw::DrawRay(const Ray& ray, Color& color, float length, float duration, bool depthTest)
{
DrawLine(ray.Position, ray.Position + (ray.Direction.GetNormalized() * length), color, duration, depthTest);
}
void DebugDraw::DrawLine(const Vector3& start, const Vector3& end, const Color& color, float duration, bool depthTest)