/// <summary> /// /// </summary> /// <param name="cam"></param> /// <param name="windowWidth"></param> /// <param name="windowHeight"></param> public void Draw(Camera cam, int windowWidth, int windowHeight) { // store previous hitbox state info Dictionary <int, Vector3> previousPosition = CalculatePreviousState(); // reset model parts if (ModelPartsIndices != null) { for (int i = 0; i < ModelPartsIndices.Length; i++) { ModelPartsIndices[i].AnimIndex = -1; } } // process ftcmd SubactionProcess.SetFrame(viewport.Frame); // update display info JointManager.DOBJManager.OverlayColor = SubactionProcess.OverlayColor; JointManager._settings.RenderBones = bonesToolStripMenuItem.Checked; // apply model animations JointManager.Frame = viewport.Frame; JointManager.UpdateNoRender(); // character invisibility if (!SubactionProcess.CharacterInvisibility && modelToolStripMenuItem.Checked) { JointManager.Render(cam, false); } // hurtbox collision if (hurtboxesToolStripMenuItem.Checked) { HurtboxRenderer.Render(JointManager, Hurtboxes, null, SubactionProcess.BoneCollisionStates, SubactionProcess.BodyCollisionState); } // hitbox collision foreach (var hb in SubactionProcess.Hitboxes) { var boneID = hb.BoneID; if (boneID == 0) { if (JointManager.GetJOBJ(1).Child == null) // special case for character like mewtwo with a leading bone { boneID = 2; } else { boneID = 1; } } var transform = Matrix4.CreateTranslation(hb.Point1) * JointManager.GetWorldTransform(boneID); transform = transform.ClearScale(); float alpha = 0.4f; Vector3 hbColor = HitboxColor; if (hb.Element == 8) { hbColor = GrabboxColor; } // drawing a capsule takes more processing power, so only draw it if necessary if (interpolationToolStripMenuItem.Checked && previousPosition != null && previousPosition.ContainsKey(hb.ID)) { var pos = Vector3.TransformPosition(Vector3.Zero, transform); var cap = new Capsule(pos, previousPosition[hb.ID], hb.Size); cap.Draw(Matrix4.Identity, new Vector4(hbColor, alpha)); } else { DrawShape.DrawSphere(transform, hb.Size, 16, 16, hbColor, alpha); } // draw hitbox angle if (hitboxInfoToolStripMenuItem.Checked) { if (hb.Angle != 361) { DrawShape.DrawAngleLine(cam, transform, hb.Size, MathHelper.DegreesToRadians(hb.Angle)); } else { DrawShape.DrawSakuraiAngle(cam, transform, hb.Size); } GLTextRenderer.RenderText(cam, hb.ID.ToString(), transform, StringAlignment.Center, true); } } // environment collision if (ECB != null) { var topN = JointManager.GetWorldTransform(1).ExtractTranslation(); var bone1 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone1)); var bone2 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone2)); var bone3 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone3)); var bone4 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone4)); var bone5 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone5)); var bone6 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone6)); var minx = float.MaxValue; var miny = float.MaxValue; var maxx = float.MinValue; var maxy = float.MinValue; foreach (var p in new Vector3[] { bone1, bone2, bone3, bone4, bone5, bone6 }) { minx = Math.Min(minx, p.Z); maxx = Math.Max(maxx, p.Z); miny = Math.Min(miny, p.Y); maxy = Math.Max(maxy, p.Y); } // ecb diamond if (eCBToolStripMenuItem.Checked) { DrawShape.DrawECB(topN, minx, miny, maxx, maxy, groundECH.Checked); } // ledge grav if (ledgeGrabBoxToolStripMenuItem.Checked) { var correct = Math.Abs(minx - maxx) / 2; //behind DrawShape.DrawLedgeBox( topN.Z, topN.Y + ECB.VerticalOffsetFromTop - ECB.VerticalScale / 2, topN.Z - (correct + ECB.HorizontalScale), topN.Y + ECB.VerticalOffsetFromTop + ECB.VerticalScale / 2, Color.Red); // in front DrawShape.DrawLedgeBox( topN.Z, topN.Y + ECB.VerticalOffsetFromTop - ECB.VerticalScale / 2, topN.Z + correct + ECB.HorizontalScale, topN.Y + ECB.VerticalOffsetFromTop + ECB.VerticalScale / 2, Color.Blue); } } // throw dummy if (throwModelToolStripMenuItem.Checked && !SubactionProcess.ThrownFighter && ThrowDummyManager.JointCount > 0) { if (viewport.Frame < ThrowDummyManager.Animation.FrameCount) { ThrowDummyManager.Frame = viewport.Frame; } ThrowDummyManager.SetWorldTransform(4, JointManager.GetWorldTransform(JointManager.JointCount - 2)); ThrowDummyManager.Render(cam, false); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(35), 1.5f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(4), 1.5f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(10), 1f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(15), 1f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(22), 1f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(40), 1f, 16, 16, ThrowDummyColor, 0.5f); } // sword trail //AfterImageRenderer.RenderAfterImage(JointManager, viewport.Frame, after_desc); }
/// <summary> /// /// </summary> /// <param name="cam"></param> /// <param name="frame"></param> public void Render(Camera cam, float frame) { if (frame == -1 && entryAnimation.Count > 0) { entryAnimation.Clear(); } if (frame == 0) { entryAnimation.Clear(); // Load Animation foreach (var i in Icons) { if (i.AnimJoint == null) { continue; } var a = new JointAnimManager(); a.FromAnimJoint(i.AnimJoint); entryAnimation.Add(i, a); } } for (int i = 0; i < Icons.Length; i++) { var ico = Icons[i]; if (ico.Joint == null) { continue; } var transform = Matrix4.Identity; if (entryAnimation.ContainsKey(ico)) { transform = entryAnimation[ico].GetAnimatedMatrix(frame, 0, ico.Joint); } else { transform = Matrix4.CreateScale(ico.Joint.SX, ico.Joint.SY, ico.Joint.SZ) * Matrix4.CreateFromQuaternion(Math3D.FromEulerAngles(ico.Joint.RZ, ico.Joint.RY, ico.Joint.RX)) * Matrix4.CreateTranslation(ico.Joint.TX, ico.Joint.TY, ico.Joint.TZ); } if (IconJOBJManager.JointCount > 0) { IconJOBJManager.SetWorldTransform(0, transform); ico.IconTOBJ.Flags = TOBJ_FLAGS.LIGHTMAP_DIFFUSE | TOBJ_FLAGS.COLORMAP_MODULATE | TOBJ_FLAGS.ALPHAMAP_MODULATE; IconJOBJManager.GetJOBJ(0).Child.Dobj.Next.Mobj.Textures = ico.IconTOBJ; IconJOBJManager.Render(cam, false); } if (sssEditor.SelectedIndices.Contains(i)) { if (sssEditor.SelectedIndices.Count == 1 && StageNameJOBJManager.JointCount > 0) { ico.NameTOBJ.Flags = TOBJ_FLAGS.LIGHTMAP_DIFFUSE | TOBJ_FLAGS.COLORMAP_MODULATE | TOBJ_FLAGS.ALPHAMAP_MODULATE; StageNameJOBJManager.GetJOBJ(0).Child.Child.Dobj.Mobj.Textures = ico.NameTOBJ; } var rect = ico.ToRectangle(); DrawShape.DrawRectangle(rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height, ico.Joint.TZ, 2, MEX_CSSIconEntry.SelectedIconColor); if (Dragging) { DrawShape.Line(new Vector3(-100, rect.Y, 0), new Vector3(100, rect.Y, 0), SnapColor, 1); DrawShape.Line(new Vector3(rect.X, -100, 0), new Vector3(rect.X, 100, 0), SnapColor, 1); DrawShape.Line(new Vector3(-100, rect.Y + rect.Height, 0), new Vector3(100, rect.Y + rect.Height, 0), SnapColor, 1); DrawShape.Line(new Vector3(rect.X + rect.Width, -100, 0), new Vector3(rect.X + rect.Width, 100, 0), SnapColor, 1); } } } StageNameJOBJManager.Render(cam); }
/// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="target"></param> /// <param name="animation"></param> /// <returns></returns> public static JointAnimManager Retarget(HSD_JOBJ source, HSD_JOBJ target, JointAnimManager animation, JointMap sourceMap = null, JointMap targetMap = null) { var sourceManager = new JOBJManager(); sourceManager.SetJOBJ(source); var sourceInverseWorldTransforms = new List <Matrix4>(); for (int i = 0; i < sourceManager.JointCount; i++) { sourceInverseWorldTransforms.Add(sourceManager.GetWorldTransform(i).Inverted()); } sourceManager.Animation = animation; var targetManager = new JOBJManager(); targetManager.SetJOBJ(target); JointAnimManager newAnim = new JointAnimManager(); newAnim.FrameCount = sourceManager.Animation.FrameCount; var targetWorldTransforms = new List <Matrix4>(); for (int i = 0; i < targetManager.JointCount; i++) { targetWorldTransforms.Add(targetManager.GetWorldTransform(i)); newAnim.Nodes.Add(new AnimNode()); } targetManager.Animation = newAnim; for (int f = 0; f <= sourceManager.Animation.FrameCount; f++) { sourceManager.Frame = f - 1; sourceManager.UpdateNoRender(); targetManager.Frame = f; targetManager.UpdateNoRender(); // bake animation on target skeleton for (int i = 0; i < sourceManager.JointCount; i++) { int targetIndex = i; int sourceIndex = i; // remap bone if joint maps are present if (sourceMap != null && targetMap != null && !string.IsNullOrEmpty(sourceMap[i])) { targetIndex = targetMap.IndexOf(sourceMap[i]); } if (targetIndex == -1) { continue; } int targetParentIndex = targetManager.ParentIndex(targetManager.GetJOBJ(targetIndex)); var inverseSourceWorldRotation = sourceInverseWorldTransforms[sourceIndex]; var sourceAnimatedWorldRotation = sourceManager.GetWorldTransform(sourceIndex); var targetWorldRotation = targetWorldTransforms[targetIndex]; var rel = targetWorldRotation * inverseSourceWorldRotation * sourceAnimatedWorldRotation; if (targetParentIndex != -1) { rel *= targetManager.GetWorldTransform(targetParentIndex).Inverted(); } var rot = Math3D.ToEulerAngles(rel.ExtractRotation().Inverted()); var targetJOBJ = targetManager.GetJOBJ(targetIndex); var sourceJOBJ = sourceManager.GetJOBJ(sourceIndex); sourceManager.Animation.GetAnimatedState(f - 1, sourceIndex, sourceJOBJ, out float TX, out float TY, out float TZ, out float RX, out float RY, out float RZ, out float SX, out float SY, out float SZ); var relTranslate = new Vector3(sourceJOBJ.TX - TX, sourceJOBJ.TY - TY, sourceJOBJ.TZ - TZ); //relTranslate = Vector3.TransformNormal(relTranslate, Matrix4.CreateFromQuaternion(Math3D.FromEulerAngles(sourceJOBJ.RZ, sourceJOBJ.RY, sourceJOBJ.RX).Inverted())); //relTranslate = Vector3.TransformNormal(relTranslate, Matrix4.CreateFromQuaternion(Math3D.FromEulerAngles(targetJOBJ.RZ, targetJOBJ.RY, targetJOBJ.RX))); var relScale = new Vector3(sourceJOBJ.SX - SX, sourceJOBJ.SY - SY, sourceJOBJ.SZ - SZ); //relScale = Vector3.TransformNormal(relScale, inverseSourceWorldRotation); //relScale = Vector3.TransformNormal(relScale, targetWorldRotation); AddKey(targetIndex, f, targetJOBJ.TX - relTranslate.X, JointTrackType.HSD_A_J_TRAX, newAnim); AddKey(targetIndex, f, targetJOBJ.TY - relTranslate.Y, JointTrackType.HSD_A_J_TRAY, newAnim); AddKey(targetIndex, f, targetJOBJ.TZ - relTranslate.Z, JointTrackType.HSD_A_J_TRAZ, newAnim); AddKey(targetIndex, f, rot.X, JointTrackType.HSD_A_J_ROTX, newAnim); AddKey(targetIndex, f, rot.Y, JointTrackType.HSD_A_J_ROTY, newAnim); AddKey(targetIndex, f, rot.Z, JointTrackType.HSD_A_J_ROTZ, newAnim); AddKey(targetIndex, f, targetJOBJ.SX - relScale.X, JointTrackType.HSD_A_J_SCAX, newAnim); AddKey(targetIndex, f, targetJOBJ.SY - relScale.Y, JointTrackType.HSD_A_J_SCAY, newAnim); AddKey(targetIndex, f, targetJOBJ.SZ - relScale.Z, JointTrackType.HSD_A_J_SCAZ, newAnim); targetManager.UpdateNoRender(); } } EulerFilter(newAnim); var targetAnim = newAnim.ToAnimJoint(target, AOBJ_Flags.ANIM_LOOP); AnimationCompressor.AdaptiveCompressAnimation(targetAnim, targetMap); RemoveUnusedTracks(target, targetAnim); newAnim.FromAnimJoint(targetAnim); // apply additional single frame filter check for (int i = 0; i < sourceManager.JointCount; i++) { int targetIndex = i; int sourceIndex = i; // remap bone if joint maps are present if (sourceMap != null && targetMap != null && !string.IsNullOrEmpty(sourceMap[i])) { targetIndex = targetMap.IndexOf(sourceMap[i]); } if (targetIndex == -1) { continue; } var sourceNode = animation.Nodes[sourceIndex]; var targetNode = newAnim.Nodes[targetIndex]; FOBJ_Player sourceXRot = null; FOBJ_Player sourceYRot = null; FOBJ_Player sourceZRot = null; foreach (var t in sourceNode.Tracks) { if (t.JointTrackType == JointTrackType.HSD_A_J_ROTX) { sourceXRot = t; } if (t.JointTrackType == JointTrackType.HSD_A_J_ROTY) { sourceYRot = t; } if (t.JointTrackType == JointTrackType.HSD_A_J_ROTZ) { sourceZRot = t; } } if (sourceXRot != null && sourceYRot != null && sourceZRot != null && sourceXRot.Keys.Count == 1 && sourceYRot.Keys.Count == 1 && sourceZRot.Keys.Count == 1) { foreach (var t in targetNode.Tracks) { if (t.JointTrackType == JointTrackType.HSD_A_J_ROTX || t.JointTrackType == JointTrackType.HSD_A_J_ROTY || t.JointTrackType == JointTrackType.HSD_A_J_ROTZ) { t.Keys.RemoveAll(e => e.Frame > 0); t.Keys[0].InterpolationType = GXInterpolationType.HSD_A_OP_KEY; } } } } return(newAnim); }
/// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="target"></param> /// <param name="animation"></param> /// <param name="sourceMap"></param> /// <param name="targetMap"></param> /// <returns></returns> public static JointAnimManager SmartPort(HSD_JOBJ source, HSD_JOBJ target, JointAnimManager animation, JointMap sourceMap = null, JointMap targetMap = null) { var sourceManager = new JOBJManager(); sourceManager.SetJOBJ(source); var sourceInverseWorldTransforms = new List <Matrix4>(); for (int i = 0; i < sourceManager.JointCount; i++) { sourceInverseWorldTransforms.Add(sourceManager.GetWorldTransform(i).Inverted()); } sourceManager.Animation = animation; var targetManager = new JOBJManager(); targetManager.SetJOBJ(target); JointAnimManager newAnim = new JointAnimManager(); newAnim.FrameCount = sourceManager.Animation.FrameCount; newAnim.Nodes.Clear(); for (int i = 0; i < targetManager.JointCount; i++) { newAnim.Nodes.Add(new AnimNode()); } for (int i = 0; i < sourceManager.JointCount; i++) { int targetIndex = i; int sourceIndex = i; Console.WriteLine(sourceMap[i]); // remap bone if joint maps are present if (sourceMap != null && targetMap != null && !string.IsNullOrEmpty(sourceMap[i])) { targetIndex = targetMap.IndexOf(sourceMap[i]); } if (targetIndex == -1) { continue; } var sourceJoint = sourceManager.GetJOBJ(sourceIndex); var targetJoint = targetManager.GetJOBJ(targetIndex); Console.WriteLine($"\t {sourceJoint.RX} {sourceJoint.RY} {sourceJoint.RZ}"); Console.WriteLine($"\t {targetJoint.RX} {targetJoint.RY} {targetJoint.RZ}"); /*if(sourceMap[i] == "RLegJ") * { * var track = animation.Nodes[sourceIndex].Tracks.Find(e => e.JointTrackType == JointTrackType.HSD_A_J_ROTX); * * if (track != null) * foreach (var k in track.Keys) * k.Value += (float)Math.PI / 2; * * track = animation.Nodes[sourceIndex].Tracks.Find(e => e.JointTrackType == JointTrackType.HSD_A_J_ROTZ); * * if (track != null) * foreach (var k in track.Keys) * k.Value += (float)Math.PI / 2; * }*/ newAnim.Nodes[targetIndex].Tracks = animation.Nodes[sourceIndex].Tracks;; } return(newAnim); }
/// <summary> /// /// </summary> /// <param name="cam"></param> /// <param name="windowWidth"></param> /// <param name="windowHeight"></param> public void Draw(Camera cam, int windowWidth, int windowHeight) { // if model not loaded do nothing if (JointManager == null) { return; } // store previous hitbox state info CalculatePreviousState(); // reset model parts if (ModelPartsIndices != null) { for (int i = 0; i < ModelPartsIndices.Length; i++) { ModelPartsIndices[i].AnimIndex = -1; } } // process ftcmd SubactionProcess.SetFrame(viewport.Frame); // update display info JointManager.DOBJManager.OverlayColor = SubactionProcess.OverlayColor; JointManager._settings.RenderBones = bonesToolStripMenuItem.Checked; // apply model animations JointManager.Frame = viewport.Frame; JointManager.UpdateNoRender(); // character invisibility if (!SubactionProcess.CharacterInvisibility && modelToolStripMenuItem.Checked) { JointManager.Render(cam, false); } // hurtbox collision if (hurtboxesToolStripMenuItem.Checked) { HurtboxRenderer.Render(JointManager, Hurtboxes, null, SubactionProcess.BoneCollisionStates, SubactionProcess.BodyCollisionState); } // hitbox collision int hitboxId = 0; bool isHitboxSelected = false; foreach (var hb in SubactionProcess.Hitboxes) { if (!hb.Active) { hitboxId++; continue; } float alpha = 0.4f; Vector3 hbColor = HitboxColor; var worldPosition = hb.GetWorldPosition(JointManager); var worldTransform = Matrix4.CreateTranslation(worldPosition); if (hb.Element == 8) { hbColor = GrabboxColor; } if (subActionList.SelectedIndices.Count == 1 && hb.CommandIndex == subActionList.SelectedIndex) { hbColor = HitboxSelectedColor; isHitboxSelected = true; _transWidget.Transform = hb.GetWorldTransform(JointManager); } // drawing a capsule takes more processing power, so only draw it if necessary if (hb.Interpolate && interpolationToolStripMenuItem.Checked) { capsule.SetParameters(worldPosition, PreviousPositions[hitboxId], hb.Size); capsule.Draw(Matrix4.Identity, new Vector4(hbColor, alpha)); } else { DrawShape.DrawSphere(worldTransform, hb.Size, 16, 16, hbColor, alpha); } // draw hitbox angle if (hitboxInfoToolStripMenuItem.Checked) { if (hb.Angle != 361) { DrawShape.DrawAngleLine(cam, worldTransform, hb.Size, MathHelper.DegreesToRadians(hb.Angle)); } else { DrawShape.DrawSakuraiAngle(cam, worldTransform, hb.Size); } GLTextRenderer.RenderText(cam, hitboxId.ToString(), worldTransform, StringAlignment.Center, true); } hitboxId++; } // draw shield during guard animation if (DisplayShieldSize > 0) { DrawShape.DrawSphere(JointManager.GetWorldTransform(JointManager.JointCount - 2), DisplayShieldSize, 16, 16, ShieldColor, 0.5f); } // gfx spawn indicator foreach (var gfx in SubactionProcess.GFXOnFrame) { var boneID = gfx.Bone; if (boneID == 0) { if (JointManager.GetJOBJ(1) != null && JointManager.GetJOBJ(1).Child == null) // special case for character like mewtwo with a leading bone { boneID = 2; } else { boneID = 1; } } var transform = Matrix4.CreateTranslation(gfx.Position) * JointManager.GetWorldTransform(boneID); transform = transform.ClearScale(); DrawShape.DrawSphere(transform, 1f, 16, 16, ThrowDummyColor, 0.5f); } // environment collision if (ECB != null) { var topN = JointManager.GetWorldTransform(1).ExtractTranslation(); var bone1 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone1)); var bone2 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone2)); var bone3 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone3)); var bone4 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone4)); var bone5 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone5)); var bone6 = Vector3.TransformPosition(Vector3.Zero, JointManager.GetWorldTransform(ECB.ECBBone6)); var minx = float.MaxValue; var miny = float.MaxValue; var maxx = float.MinValue; var maxy = float.MinValue; foreach (var p in new Vector3[] { bone1, bone2, bone3, bone4, bone5, bone6 }) { minx = Math.Min(minx, p.Z); maxx = Math.Max(maxx, p.Z); miny = Math.Min(miny, p.Y); maxy = Math.Max(maxy, p.Y); } // ecb diamond if (eCBToolStripMenuItem.Checked) { DrawShape.DrawECB(topN, minx, miny, maxx, maxy, groundECH.Checked); } // ledge grav if (ledgeGrabBoxToolStripMenuItem.Checked) { var correct = Math.Abs(minx - maxx) / 2; //behind DrawShape.DrawLedgeBox( topN.Z, topN.Y + ECB.VerticalOffsetFromTop - ECB.VerticalScale / 2, topN.Z - (correct + ECB.HorizontalScale), topN.Y + ECB.VerticalOffsetFromTop + ECB.VerticalScale / 2, Color.Red); // in front DrawShape.DrawLedgeBox( topN.Z, topN.Y + ECB.VerticalOffsetFromTop - ECB.VerticalScale / 2, topN.Z + correct + ECB.HorizontalScale, topN.Y + ECB.VerticalOffsetFromTop + ECB.VerticalScale / 2, Color.Blue); } } // throw dummy if (ThrowDummyManager.Animation.NodeCount != 0 && throwModelToolStripMenuItem.Checked && !SubactionProcess.ThrownFighter && ThrowDummyManager.JointCount > 0) { if (viewport.Frame < ThrowDummyManager.Animation.FrameCount) { ThrowDummyManager.Frame = viewport.Frame; } ThrowDummyManager.SetWorldTransform(4, JointManager.GetWorldTransform(JointManager.JointCount - 2)); ThrowDummyManager.Render(cam, false); if (ThrowDummyLookupTable.Count == 0) { DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(35), 1.5f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(4), 1.5f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(10), 1f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(15), 1f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(22), 1f, 16, 16, ThrowDummyColor, 0.5f); DrawShape.DrawSphere(ThrowDummyManager.GetWorldTransform(40), 1f, 16, 16, ThrowDummyColor, 0.5f); } } if (isHitboxSelected) { _transWidget.Render(cam); } // sword trail //AfterImageRenderer.RenderAfterImage(JointManager, viewport.Frame, after_desc); }