From fe209504553752c42bc400cbb629d9e0f2252cdb Mon Sep 17 00:00:00 2001 From: joreg Date: Thu, 2 May 2024 22:15:31 +0200 Subject: [PATCH] fixes issue with transformation being applied to velocity --- deployment/VL.Augmenta.nuspec | 3 +-- src/PObject.cs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/deployment/VL.Augmenta.nuspec b/deployment/VL.Augmenta.nuspec index c996289..ffbb015 100644 --- a/deployment/VL.Augmenta.nuspec +++ b/deployment/VL.Augmenta.nuspec @@ -2,13 +2,12 @@ VL.Augmenta - 0.0.9-alpha + 0.0.10-alpha VL.Augmenta vvvv vvvv https://github.com/vvvv/VL.Augmenta false - Provides support for Augmenta tracking in VL. Try it with vvvv: http://visualprogramming.net/ VL, tracking LGPL-3.0-only diff --git a/src/PObject.cs b/src/PObject.cs index 0a5a951..3e1fb68 100644 --- a/src/PObject.cs +++ b/src/PObject.cs @@ -108,8 +108,8 @@ void updateClusterData(ReadOnlySpan data, int offset) var si = offset + sizeof(int) + i * Unsafe.SizeOf(); var p = Utils.ReadVector(data, si); - if (pointMode == CoordMode.Absolute) - clusterData[i] = clusterData[i] = p; + if (pointMode == CoordMode.Absolute || i == 1) //i=1 -> don't transform the velocity + clusterData[i] = p; else clusterData[i] = Vector3.Transform(p, parentTransform);// parentTransform.InverseTransformPoint(p); }