Seba

Members
  • Content Count

    8
  • Joined

  • Last visited

About Seba

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Seba

    Quaternion to euler angles

    Ok got it! Thanks a lot for this clear explanation.
  2. Seba

    Quaternion to euler angles

    And for more informations if I do same on the others axis. So if I rotate 91 degrees or whatever on axis Y and Z. I do get back the good results from quaternion.toEulerAngles()
  3. Seba

    Quaternion to euler angles

    Hey JohnK thank for your answer. Yes I did read this article but I still don't understand why when you rotate above 90 degrees on axe X all axis are changed. I did a mistake in code when converting radian to degrees which fix problem 1. So for my second problem if I apply a rotation of 91 degrees like below : mesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll( 0, (91 * Math.PI) / 180, // 91 degrees convert to rad 0 ); var euler = quaternion.toEulerAngles(); I get thi following results: euler.x = 89 degrees, but should be 91 euler.y = 180 degrees, but should be 0 euler.z = 180 degrees, but should be 0 Here an updated version of my playground: https://playground.babylonjs.com/#7QNRN2#2 press key 'a' gonna rotate 91 degrees on axe X and show the results in the console
  4. Hello Babylon community, I have troubles to understand how to switch from quaternion to euler angles and vice versa. First problem: When I apply a rotation to a cube on axe X which should be a 90 degrees (when the face facing us get on the top) I get a value above 130 degrees from my convertion (quaternion to euler). Second problem: When I go over 140 degree on axe X, axes Y and Z are changed! However I'm just playing with X axe. Am I missing something? Here a playground: https://playground.babylonjs.com/#7QNRN2#1 Press the key 'a' to rotate on the axe X and watch the console to see the euler angles convert from radian to degrees. Keys mapping: keys 'a' and 'd' for rotation on X keys 'w' and 's' for rotation on Y keys 'q' and 'e' for rotation on Z
  5. Hello Jerome. Thanks for your reply. Ok I was really hoping to keep my sprites system, but I'll try either your solution or Deltakosh one.
  6. Hi Deltakosh, Thanks for your reply. Do you mean something like using a mesh instead of a sprite like a plane, then set my texture to this plane and set plane.billboardMode to BILLBOARDMODE_ALL? I have a lot of sprites. My project is a Map in 3D of a building let's say a shopping center and each shop is represented by a mesh in 3D and floating above a sprite which is the shop's logo. I'm affraid that using meshes instead of sprites will drop down the rendering.
  7. Ok I found how to fix it by using renderingGroupId parameter from the meshes and the sprite manager. set 0 to meshes and 1 to sprite manager. But it's not perfect, if we set the camera position under the plane (grass) we have the sprite drawn before the plane.
  8. Hello guys, I have troubles with showing shapes that have an opacity < 1 and which are behind a sprite that also has an opacity < 1. I attach a screenshot and here the playground As you can see the shapes behind the sprite disappear I tried differents options with material's shape such as : forceDepthWrite needDepthPrePass separateCullingPass zOffset But nothing works, and on the Sprite side we don't have a lot of parameters to play with. I wonder if it's not due to a kind of optimization of babylon to not drop down the render.