Skip to content

Commit 2d81a29

Browse files
authored
Merge pull request #10808 from raulsntos/dotnet/using_transforms
Fix C# example about interpolating with quaternions
2 parents 2ec67eb + f044c7c commit 2d81a29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorials/3d/using_transforms.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ Converting a rotation to quaternion is straightforward.
383383
.. code-tab:: csharp
384384

385385
// Convert basis to quaternion, keep in mind scale is lost
386-
var a = transform.Basis.GetQuaternion();
387-
var b = transform2.Basis.GetQuaternion();
386+
var a = new Quaternion(transform.Basis);
387+
var b = new Quaternion(transform2.Basis);
388388
// Interpolate using spherical-linear interpolation (SLERP).
389389
var c = a.Slerp(b, 0.5f); // find halfway point between a and b
390390
// Apply back

0 commit comments

Comments
 (0)