Skip to content

Commit

Permalink
Physics: fix collider mesh generation helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
phr00t committed Jan 29, 2020
1 parent dd104b0 commit 76827af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sources/engine/Xenko.Physics/Bepu/BepuHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]);
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion sources/engine/Xenko.Physics/Bepu/BepuRigidbodyComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 76827af

Please sign in to comment.