# \#quaternion

**URL:** https://forum.babylonjs.com/tag/quaternion/58.md

[Latest](https://forum.babylonjs.com/latest.md) · [Categories](https://forum.babylonjs.com/categories.md) · [Tags](https://forum.babylonjs.com/tags.md)

---

## [How to correctly setup a proxy node for RotationGizmo](https://forum.babylonjs.com/t/how-to-correctly-setup-a-proxy-node-for-rotationgizmo/59354)

<div class="topic-metadata">

**Author:** [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Replies:** 10\
**Last updated:** [July 7, 2025, 7:56am UTC](https://forum.babylonjs.com/t/how-to-correctly-setup-a-proxy-node-for-rotationgizmo/59354 "2025-07-07T07:56:03Z")

</div>

For anyone interested , this is the latest playground: I’m using RotationGizmo for nodes with non uniform scaling, and searched the forum to find this post about proxing transfroms. I’ve tried to setup a proxy node …

---

## [How to convert Vrm coordinates to MMD coordinates](https://forum.babylonjs.com/t/how-to-convert-vrm-coordinates-to-mmd-coordinates/58442)

<div class="topic-metadata">

**Author:** [@Goh23](https://forum.babylonjs.com/u/Goh23)\
**Replies:** 3\
**Last updated:** [May 16, 2025, 4:53am UTC](https://forum.babylonjs.com/t/how-to-convert-vrm-coordinates-to-mmd-coordinates/58442 "2025-05-16T04:53:11Z")

</div>

Hello, everyone. I have a question about the Vrm and MMD models. I am trying to convert programmatically obtained vrm coordinates to mmd coordinates, but it is not working well and is inaccurate. There is little informat…

---

## ["FromLookDirectionLH" is a bit too complicated. Maybe a simpler api should be provided?](https://forum.babylonjs.com/t/fromlookdirectionlh-is-a-bit-too-complicated-maybe-a-simpler-api-should-be-provided/41426)

<div class="topic-metadata">

**Author:** [@qq2315137135](https://forum.babylonjs.com/u/qq2315137135)\
**Replies:** 4\
**Last updated:** [December 2, 2024, 4:29pm UTC](https://forum.babylonjs.com/t/fromlookdirectionlh-is-a-bit-too-complicated-maybe-a-simpler-api-should-be-provided/41426 "2024-12-02T16:29:29Z")

</div>

Compared to the lookAt() function under transformNode, Quaternion’s FromLookDirection is a bit too complicated. It has to consider both the left-hand or right-hand coordinate system, and how to give the up axis. This i…

---

## [Standardizing InPlace, ToNew, and ToRef for Matrix, Vector3, and Quaternion?](https://forum.babylonjs.com/t/standardizing-inplace-tonew-and-toref-for-matrix-vector3-and-quaternion/54011)

<div class="topic-metadata">

**Author:** [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Replies:** 4\
**Last updated:** [October 8, 2024, 11:55pm UTC](https://forum.babylonjs.com/t/standardizing-inplace-tonew-and-toref-for-matrix-vector3-and-quaternion/54011 "2024-10-08T23:55:00Z")

</div>

Is there any leaning toward standardizing the “plain” functions and whether they are InPlace or ToNew? Or is there too much code that is dependent on the current functionality? In another thread: I was just reviewing…

---

## [How to rotate with physics applied and with parent-child relationship](https://forum.babylonjs.com/t/how-to-rotate-with-physics-applied-and-with-parent-child-relationship/48008)

<div class="topic-metadata">

**Author:** [@Octo8080X](https://forum.babylonjs.com/u/Octo8080X)\
**Replies:** 7\
**Last updated:** [February 14, 2024, 4:56pm UTC](https://forum.babylonjs.com/t/how-to-rotate-with-physics-applied-and-with-parent-child-relationship/48008 "2024-02-14T16:56:58Z")

</div>

We want to rotate a child by reflecting the parent rotation generated by Constraint to the child. In addition, we would like to make the object output only up to a certain angular velocity when it rotates. It has taken…

---

## [How to initially place objects assuming a constraint](https://forum.babylonjs.com/t/how-to-initially-place-objects-assuming-a-constraint/47895)

<div class="topic-metadata">

**Author:** [@Octo8080X](https://forum.babylonjs.com/u/Octo8080X)\
**Replies:** 4\
**Last updated:** [February 8, 2024, 11:51am UTC](https://forum.babylonjs.com/t/how-to-initially-place-objects-assuming-a-constraint/47895 "2024-02-08T11:51:17Z")

</div>

When connecting objects with Constraint, such as HingeConstraint, if the initial placement is not set up well, the objects often scatter with the momentum of moving to the connection position. As a countermeasure, we wa…

---

## [Set rotation of PhysicsBody (Havok) programmatically](https://forum.babylonjs.com/t/set-rotation-of-physicsbody-havok-programmatically/47002)

<div class="topic-metadata">

**Author:** [@tkalmi](https://forum.babylonjs.com/u/tkalmi)\
**Replies:** 6\
**Last updated:** [January 11, 2024, 3:10pm UTC](https://forum.babylonjs.com/t/set-rotation-of-physicsbody-havok-programmatically/47002 "2024-01-11T15:10:40Z")

</div>

Hello! (I’m a novice when it comes to graphics programming, so please bear with me. I’m a pretty experienced web dev, but my only brush with 3d graphics is a basics course in university over 5 years ago.) I’m building …

---

## [Producing Quaternion between vectors](https://forum.babylonjs.com/t/producing-quaternion-between-vectors/46841)

<div class="topic-metadata">

**Author:** [@DavidP](https://forum.babylonjs.com/u/DavidP)\
**Replies:** 4\
**Last updated:** [January 3, 2024, 1:35am UTC](https://forum.babylonjs.com/t/producing-quaternion-between-vectors/46841 "2024-01-03T01:35:19Z")

</div>

Hello, In the example below I compute a quaternion of rotation from U vector to V vector. After that, I create a new vector U2 that is initialized to U and then rotated by the quaternion. Thus U2 should be V, but that i…

---

## [360 degree rotationQuaternion animation?](https://forum.babylonjs.com/t/360-degree-rotationquaternion-animation/45853)

<div class="topic-metadata">

**Author:** [@MeshSlayer](https://forum.babylonjs.com/u/MeshSlayer)\
**Replies:** 3\
**Last updated:** [November 23, 2023, 7:23am UTC](https://forum.babylonjs.com/t/360-degree-rotationquaternion-animation/45853 "2023-11-23T07:23:56Z")

</div>

hello guys, I’m trying to animate a quaternion to rotate multiple times (more than 360 degrees). it doesn’t seem to work since 1 or more complete turns are the same as no turns at all and for eg 1,5 turn is the same as…

---

## [Camera attached object get orientation flipped when attached to WebXR Anchor (playground included)](https://forum.babylonjs.com/t/camera-attached-object-get-orientation-flipped-when-attached-to-webxr-anchor-playground-included/43395)

<div class="topic-metadata">

**Author:** [@Wellandr](https://forum.babylonjs.com/u/Wellandr)\
**Replies:** 2\
**Last updated:** [August 18, 2023, 9:07pm UTC](https://forum.babylonjs.com/t/camera-attached-object-get-orientation-flipped-when-attached-to-webxr-anchor-playground-included/43395 "2023-08-18T21:07:14Z")

</div>

Hello, I am facing a bug apparently caused by a lack of orientation of an object that get worse when I try to apply rotation. How do you fix that ? Playground : Goal : place an object in AR based on the camera positi…

---

## [RotationGizmo: Can I get precise rotation value instead of Quaternion?](https://forum.babylonjs.com/t/rotationgizmo-can-i-get-precise-rotation-value-instead-of-quaternion/41708)

<div class="topic-metadata">

**Author:** [@ChirodSummerset](https://forum.babylonjs.com/u/ChirodSummerset)\
**Replies:** 3\
**Last updated:** [June 20, 2023, 1:13am UTC](https://forum.babylonjs.com/t/rotationgizmo-can-i-get-precise-rotation-value-instead-of-quaternion/41708 "2023-06-20T01:13:21Z")

</div>

Hi: My scene uses a gizmo with 3 position gizmo and a rotation-y gizmo, the configure is like below: const gizmoMgr = new GizmoManager(scene); gizmoMgr.scaleGizmoEnabled = false; gizmoMgr.positionGizmoEnabl…

---

## [Additive Rotation Quaternion Animation](https://forum.babylonjs.com/t/additive-rotation-quaternion-animation/41351)

<div class="topic-metadata">

**Author:** [@MutantPiggieGolem1](https://forum.babylonjs.com/u/MutantPiggieGolem1)\
**Replies:** 3\
**Last updated:** [June 6, 2023, 9:56am UTC](https://forum.babylonjs.com/t/additive-rotation-quaternion-animation/41351 "2023-06-06T09:56:32Z")

</div>

I’m trying to animate the rotation of portions of a rubik’s cube (9 given cubes rotate around one of three cardinal axes by 90 degrees), and am using mesh.rotationQuaternion and Quaternion.RotationAxis to achieve this. T…

---

## [Need to fix this Homing missile animation](https://forum.babylonjs.com/t/need-to-fix-this-homing-missile-animation/40237)

<div class="topic-metadata">

**Author:** [@steelx](https://forum.babylonjs.com/u/steelx)\
**Replies:** 12\
**Last updated:** [May 3, 2023, 5:20am UTC](https://forum.babylonjs.com/t/need-to-fix-this-homing-missile-animation/40237 "2023-05-03T05:20:03Z")

</div>

at the moment it doesnt feel right. DEMO video: code: import { StandardMaterial, Color3, SphereParticleEmitter, ParticleSystem, Texture, Vector3, Quaternion, Animation, CreateCapsuleVertexData,…

---

## [WebXR - Snap turning problem & smooth locomotion](https://forum.babylonjs.com/t/webxr-snap-turning-problem-smooth-locomotion/39350)

<div class="topic-metadata">

**Author:** [@Corysia](https://forum.babylonjs.com/u/Corysia)\
**Replies:** 2\
**Last updated:** [March 26, 2023, 10:13pm UTC](https://forum.babylonjs.com/t/webxr-snap-turning-problem-smooth-locomotion/39350 "2023-03-26T22:13:54Z")

</div>

WhiIe looking up how to do snap turning in BabylonJS, I came across this playground: https://playground.babylonjs.com/#INBVUY#102 There is a flaw in it that the camera is rotating around its local Y axis, not the world…

---

## [RotationYawPitchRollToRef in SIMD](https://forum.babylonjs.com/t/rotationyawpitchrolltoref-in-simd/39182)

<div class="topic-metadata">

**Author:** [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Replies:** 5\
**Last updated:** [March 22, 2023, 6:48am UTC](https://forum.babylonjs.com/t/rotationyawpitchrolltoref-in-simd/39182 "2023-03-22T06:48:00Z")

</div>

\#include \<wasm\_simd128.h\> typedef float vec4\[4\]; typedef float quat\[4\]; // angles: yaw, pitch, roll, 0, using vec4 to force align inline void RotationYawPitchRollToRef(vec4 angles, quat dest) { /\* // The original c…

---

## [Optimizing performance of FromArrayToRef](https://forum.babylonjs.com/t/optimizing-performance-of-fromarraytoref/37513)

<div class="topic-metadata">

**Author:** [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Replies:** 11\
**Last updated:** [January 27, 2023, 7:20am UTC](https://forum.babylonjs.com/t/optimizing-performance-of-fromarraytoref/37513 "2023-01-27T07:20:45Z")

</div>

In vector functions like Vector3.FromArrayToRef and Quaternion.FromArrayToRef, values are assigned to properites like x, y, z, w, which are internally setter functions which sets things like \_x and \_isDirty, so in FromAr…

---

## [How to rotate mesh by aligning normal with axis?](https://forum.babylonjs.com/t/how-to-rotate-mesh-by-aligning-normal-with-axis/33389)

<div class="topic-metadata">

**Author:** [@brittany](https://forum.babylonjs.com/u/brittany)\
**Replies:** 5\
**Last updated:** [August 29, 2022, 2:21pm UTC](https://forum.babylonjs.com/t/how-to-rotate-mesh-by-aligning-normal-with-axis/33389 "2022-08-29T14:21:52Z")

</div>

I have a mesh that has been arbitrarily rotated. I would like to rotate it so that it is flat on the ground. My idea is to find the closest normal to the y-axis and then align that normal to the axis. I’m using a widely …

---

## [How to animate an imported mesh?](https://forum.babylonjs.com/t/how-to-animate-an-imported-mesh/34959)

<div class="topic-metadata">

**Author:** [@wavydavid](https://forum.babylonjs.com/u/wavydavid)\
**Replies:** 4\
**Last updated:** [October 19, 2022, 7:16pm UTC](https://forum.babylonjs.com/t/how-to-animate-an-imported-mesh/34959 "2022-10-19T19:16:59Z")

</div>

Hello! I am extremely new to Babylon and am trying to figure out how to animate an imported mesh with quaternion data. I can seem to animate a stock mesh like the box or cylinder but not any imported mesh like the one …

---

## [Struggling with rotating (and animating) using .rotate() and quaternions](https://forum.babylonjs.com/t/struggling-with-rotating-and-animating-using-rotate-and-quaternions/34895)

<div class="topic-metadata">

**Author:** [@callumdotexe](https://forum.babylonjs.com/u/callumdotexe)\
**Replies:** 14\
**Last updated:** [October 19, 2022, 3:06pm UTC](https://forum.babylonjs.com/t/struggling-with-rotating-and-animating-using-rotate-and-quaternions/34895 "2022-10-19T15:06:55Z")

</div>

Hey everyone, I am working on a project with a cylindrical mesh that rotates using the mouse scroll and also when the mouse is clicked and dragged. To achieve this, I call a method that takes the amount scrolled/dragged…

---

## [Quaternion rotation breaks position](https://forum.babylonjs.com/t/quaternion-rotation-breaks-position/33649)

<div class="topic-metadata">

**Author:** [@JaChadwell](https://forum.babylonjs.com/u/JaChadwell)\
**Replies:** 2\
**Last updated:** [September 5, 2022, 12:35pm UTC](https://forum.babylonjs.com/t/quaternion-rotation-breaks-position/33649 "2022-09-05T12:35:28Z")

</div>

Hi all! The goal is when you click on the ground the capsule will move to that position and rotate, the sphere in front is how you tell which way it’s facing. Here is the playground to see that https://playground.babyl…

---

## [rotationQuaternion and Animation](https://forum.babylonjs.com/t/rotationquaternion-and-animation/32347)

<div class="topic-metadata">

**Author:** [@Takemura](https://forum.babylonjs.com/u/Takemura)\
**Replies:** 4\
**Last updated:** [July 21, 2022, 3:24pm UTC](https://forum.babylonjs.com/t/rotationquaternion-and-animation/32347 "2022-07-21T15:24:09Z")

</div>

Greets everyone, I am making progress in my Aiming-Targeting-System, but got some troubles with: using BABYLON.Quaternion.RotationAxis. Does it expect bone axis (I use TransformNode of bone) or global world axis? How …

---

## [Combine rotations so item always faces camera... but also faces the bottom of the screen](https://forum.babylonjs.com/t/combine-rotations-so-item-always-faces-camera-but-also-faces-the-bottom-of-the-screen/30965)

<div class="topic-metadata">

**Author:** [@jekelija](https://forum.babylonjs.com/u/jekelija)\
**Replies:** 11\
**Last updated:** [June 1, 2022, 9:34pm UTC](https://forum.babylonjs.com/t/combine-rotations-so-item-always-faces-camera-but-also-faces-the-bottom-of-the-screen/30965 "2022-06-01T21:34:38Z")

</div>

The goal is to get a hotspot that always faces the camera… but as its an info icon, the request was to get the i to always face the bottom of the screen (like text). Ive been pounding my head against the wall for days tr…

---

## [Baking Quaternions Deforms Meshes](https://forum.babylonjs.com/t/baking-quaternions-deforms-meshes/22722)

<div class="topic-metadata">

**Author:** [@Caner](https://forum.babylonjs.com/u/Caner)\
**Replies:** 12\
**Last updated:** [August 4, 2021, 11:09am UTC](https://forum.babylonjs.com/t/baking-quaternions-deforms-meshes/22722 "2021-08-04T11:09:40Z")

</div>

Hello everyone! I am trying to bake transformations of each mesh of an imported model and some meshes are distorted in the output. I figured that it is about transformations (mostly quaternions) and mesh hierarchy. Thi…

---

## [Something about Quaternion.toEulerAngles api](https://forum.babylonjs.com/t/something-about-quaternion-toeulerangles-api/19071)

<div class="topic-metadata">

**Author:** [@ecojust](https://forum.babylonjs.com/u/ecojust)\
**Replies:** 5\
**Last updated:** [March 11, 2021, 9:30am UTC](https://forum.babylonjs.com/t/something-about-quaternion-toeulerangles-api/19071 "2021-03-11T09:30:39Z")

</div>

I’d like to make sure about this area I think the default order should be YXZ according to the function “toEulerAnglesToRef”

---

## [Inspector Quaternion Display Misses Out W](https://forum.babylonjs.com/t/inspector-quaternion-display-misses-out-w/18985)

<div class="topic-metadata">

**Author:** [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Replies:** 3\
**Last updated:** [March 8, 2021, 9:35pm UTC](https://forum.babylonjs.com/t/inspector-quaternion-display-misses-out-w/18985 "2021-03-08T21:35:59Z")

</div>

see inspector in https://playground.babylonjs.com/#Y492JW
