Created
November 8, 2022 23:32
-
-
Save stevedekorte/b5da27201df066b37586a4bced2d4fc9 to your computer and use it in GitHub Desktop.
Rapier rotations not getting what was set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CODE: | |
const a = [-0.0000064798259700182825, -0.0013201627880334854, 0.0000027575993044592906, 0.9999991059303284] | |
rigidBody.setRotation(new RAPIER.Quaternion(a[0], a[1], a[2], a[3])) | |
const r = rigidBody.rotation() | |
console.log("before:", a) | |
console.log(" after:", [r.x, r.y, r.z, r.w]) | |
OUTPUT: | |
before: (4) [-0.0000064798259700182825, -0.0013201627880334854, 0.0000027575993044592906, 0.9999991059303284] | |
after: (4) [-0.000006479826424765633, -0.0013201627880334854, 0.0000027575993044592906, 0.9999991059303284] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment