diff --git a/sources/engine/Xenko.Physics/Bepu/BepuHelpers.cs b/sources/engine/Xenko.Physics/Bepu/BepuHelpers.cs index 34bd5f934f..341ad58115 100644 --- a/sources/engine/Xenko.Physics/Bepu/BepuHelpers.cs +++ b/sources/engine/Xenko.Physics/Bepu/BepuHelpers.cs @@ -330,7 +330,7 @@ private static unsafe bool getMeshOutputs(Xenko.Rendering.Mesh modelMesh, out Li for (var k = 0; k < numIndices; k++) { // Offset indices - indicies[k] = (int)dst[k]; + indicies.Add((int)dst[k]); } } else @@ -342,7 +342,7 @@ private static unsafe bool getMeshOutputs(Xenko.Rendering.Mesh modelMesh, out Li for (var k = 0; k < numIndices; k++) { // Offset indices - indicies[k] = dst[k]; + indicies.Add(dst[k]); } } } diff --git a/sources/engine/Xenko.Physics/Bepu/BepuRigidbodyComponent.cs b/sources/engine/Xenko.Physics/Bepu/BepuRigidbodyComponent.cs index c1eb54166e..8a8cceb020 100644 --- a/sources/engine/Xenko.Physics/Bepu/BepuRigidbodyComponent.cs +++ b/sources/engine/Xenko.Physics/Bepu/BepuRigidbodyComponent.cs @@ -553,7 +553,10 @@ public override Xenko.Core.Mathematics.Quaternion Rotation } set { - if (bodyDescription.Pose.Orientation == BepuHelpers.ToBepu(value)) return; + if (bodyDescription.Pose.Orientation.X == value.X && + bodyDescription.Pose.Orientation.Y == value.Y && + bodyDescription.Pose.Orientation.Z == value.Z && + bodyDescription.Pose.Orientation.W == value.W) return; bodyDescription.Pose.Orientation.X = value.X; bodyDescription.Pose.Orientation.Y = value.Y;