Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Here my problem : http://jsfiddle.net/JulienGobin/BZ4A4/ As i said I got the good euler <-> quat <-> matrix conversions, you can see that trying to use these commands in the console after clicking on the "Use euclideanspace conversions" button : euler <-> quat var e = new BABYLON.Vector3(0.1, 0.2, 0.3); var q = BABYLON.Quaternion.RotationYawPitchRoll(e.y, e.x, e.z); console.log(e); // BABYLON.Vector3 {x: 0.1, y: 0.2, z: 0.3} console.log(q.toEulerAngles()); // BABYLON.Vector3 {x: 0.09999999999999999, y: 0.2, z: 0.30000000000000004} quat <-> mat v
  2. (Sorry, again, for the long time past) I still have some issue. I got the good euler -> quaternion and quaternion -> euler conversion (and the good quaternion -> matrix and matrix -> quaternion conversions) But, currently my math use a XYZ and not a YXZ euler order rotation, i'm working on it.
  3. It works (according to many test) but ... i'm not 101% sure that no math-mistake have slipped themself into my code. Prefer double-triple check before send a pull request ^^' (maybe today).
  4. (Sorry for the long time past) I've got something right now : http://jsfiddle.net/JulienGobin/BZ4A4/ Some improvement still has to be done. And I'm not sure why it's needed to multiply by -2 instead of 2 during the quaternion to matrix conversion. I'll look deeper as soon as possible.
  5. I found something else when i look deeper in the blender exprot to babylon (maybe not really realated to this problem i made a fork) : http://www.html5gamedevs.com/topic/3293-amera-rotation-error-during-blender-export/
  6. Maybe related to this first problem : http://www.html5gamedevs.com/topic/3159-quaternionrotationyawpitchroll-parameters-and-toeulerangles-result-should-be-the-same/ When i try some rotation-exportation from blender to babylon i found a problem. Here my scene in blender : (download here : http://dfiles.eu/files/m1dcdze18) As you can see the camera is not looking toward the object. but when i import the full scene on babylon js i can see this : (download here : http://dfiles.eu/files/w4etjfuh6) Looking deeper in the .babylon it seems that the exporter set a target on the camera
  7. I'm not absolutely sure. Here my test : First on babylon js using BABYLON.Quaternion.YawPitchRoll with yaw = 0.1, pitch = 0.2, roll = 0.3 (assuming it's in radians) q = (x: 0.10602051106179562, y: 0.034270798550482096, z: 0.1435721750273919, w: 0.9833474432563558). Second using the Calculator on this page http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm (at "Angle Calculator and Further examples"): - with heading = yaw, attitude = -roll, bank = pitch cause of the two differents conventions using by BabylonJS and euclideanspace.com (http://w
  8. I try something using math and conventions from here : http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm Euler to Quaternion : http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm Quaternion to Euler : http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm I get right Euler to Quaternion and Quaternion to Euler conversions but ... i got also some issues with the world matrix. http://jsfiddle.net/JulienGobin/BZ4A4/42/ It seems that the quaternion compute currently with the babylon js way are wrong (i hope it'
  9. Thank for your reply, the new pull request (without the wireframe stuff) is here : https://github.com/BabylonJS/Babylon.js/pull/126 For the wireframe stuff i'm really surprised that this display mode is worst than the normal one. I will force myself on more test next time ^^'. (Edit : wrong link, my bad)
  10. Here it is https://github.com/BabylonJS/Babylon.js/pull/122
  11. Ok, thank for your fast reply . I'm already working on a system that makes the job. (Because i really need it), maybe i can send you a pull request when i have finished (tomorrow) ? (I'm also working on a system, based on this first one, that forces the wireframe display when the fps is shutting down when a camera is moving; of course it's optional and parametrable. Will you be interested by it ?). Here what i have done so far : http://jsfiddle.net/JulienGobin/7DT4R/ http://jsfiddle.net/JulienGobin/4QhX4/
  12. Hi everyone, First of all, happy new year and thanks for this amazing webgl engine. I noticed the view matrix of the camera is computed for each frame when BABYLON.Camera.prototype.getViewMatrix is called by BABYLON.Scene.prototype._renderForCamera (called by BABYLON.Scene.prototype.render). BABYLON.Camera.prototype.getViewMatrix is in two parts: this._computedViewMatrix = this._getViewMatrix();// BABYLON.Camera.prototype._getViewMatrix is overrided in sub-classes (ArcRotateCamera and FreeCamera compute for each frame a matrix and return it)and if (this.parent && this.parent.getW
  • Create New...