Add ShowDebugDrawSkeleton to preview Animated Model skeleton via Debug Draw

#2443
This commit is contained in:
Wojtek Figat
2024-04-16 12:00:05 +02:00
parent cd2f96e3c0
commit ce67c3a98d
3 changed files with 51 additions and 1 deletions

View File

@@ -336,7 +336,8 @@ namespace FlaxEditor.Viewport.Previews
if (_showNodes)
{
// Draw bounding box at the node locations
var localBox = new OrientedBoundingBox(new Vector3(-1.0f), new Vector3(1.0f));
var boxSize = Mathf.Min(1.0f, _previewModel.Sphere.Radius / 100.0f);
var localBox = new OrientedBoundingBox(new Vector3(-boxSize), new Vector3(boxSize));
for (int nodeIndex = 0; nodeIndex < pose.Length; nodeIndex++)
{
if (nodesMask != null && !nodesMask[nodeIndex])