digEmAll

Members
  • Content Count

    12
  • Joined

  • Last visited

1 Follower

About digEmAll

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Italy

Recent Profile Visitors

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

  1. Thanks @brianzinn, that's great !
  2. Thanks a lot! It was easy after all
  3. Hi All, the issue I'm facing is probably trivial to solve but I couldn't find a solution. Basically I need to set the parent of a mesh (used as rotation pivot) to null after a rotation, because I need to use that pivot again for another group of meshes. I tried to use the following approach: var pos = box.getAbsolutePosition(); var rot = box.rotation; box.parent = null; box.setAbsolutePosition(pos); box.rotation = rot; but it seem to keep only the position, but not the rotation. I have created a simple playground to reproduce the problem : https://www.babylonjs-playground.com/#S13YXG#2 As you can see, when the animation is completed the bigger box returns to the original rotation. Any suggestion ? Thanks a lot in advance
  4. digEmAll

    Scale on resize

    Any news on this topic ?
  5. digEmAll

    PIXI v3 : cannot create a proper full window renderer

    I found a workaround, look at the new jsfiddle : https://jsfiddle.net/7042d86p/6/ Don't know if it might be considered a bug, anyway, with those three lines it works.
  6. Hi All, I'm starting to play with PIXI (after some tests on phaser) so apologies for the newbie question... I can't figure out why creating a game with window.innerWidth and window.innerHeight doesn't work correctly in PIXI (i.e. the scrollbars appear) while it works perfectly fine on Phaser. I reproduced the problem in two really simple jsfiddle (just a blue HTML5 canvas on a red background body that I expect to be completely covered), as you can see in the PIXI example the scrollbars appear while in the Phaser example they don't : PIXI v3 : https://jsfiddle.net/7042d86p/5/ Phaser v2: https://jsfiddle.net/o6ghgckb/2/ Any idea ? Thanks in advance
  7. This works because rotations are by 180°, if you change it to 90° the problem remains Thanks, I used your suggestion to use quaternion and I copied the necessary code bit from Mesh.rotate, obtaining this (the desired behavior) : http://babylonjs-playground.com/#NJJPP#7 Thanks to all
  8. That's great! But... is it possible to use it in animations ?
  9. Hi All, I'm facing a problem with rotations of boxes. Basically I need to rotate a cube by 90° around the system axes, but I noticed that when a box has a rotation set, say on x axis, if you set a rotation on z, actually you're rotating the mesh around the global system Y axis. Does rotation property refer to a coordinate system that is "local" to the mesh ? How can I calculate the correct x,y,z rotation with respect to the global axes ? Thanks in advance P.S. I have created a simple playground for this: http://babylonjs-playground.com/#NJJPP#0 If you click once on "rotat.around x" then when you click "rotat.around.z" (more than one time to notice the rotation) you will get a rotation around global Y axis. But if you only click on the same button multiple times (refreshing the page to reinitialize when you decide to change the button) the rotations are performed around the right axis.
  10. Thanks, for the research Actually these "rotations" might happen also programmatically, so it's easier to reach a greater number than user-clicked only, anyway I don't think I would never reach 100 times. Thanks to all for the help !
  11. Thanks iiceman for your solutions, but I don't want to disable the button because user should be able to create a "chain" of rotations, and I can't use the first solution as well because that means the second (or third, forth.. ) rotation will start before the end of the previous. Probably I oversimplified my example, but basically in the real case, box can rotate by 90° in different directions (around x, y or z) and different rotations cannot be "combined", but only "chained". My quick'n'dirty solution is to use an array as rotations queue, as shown here : http://babylonjs-playground.com/#1NSSHK#3 but I'm not expert enough in javascript to be sure this approach is safe. For example, is there a risk for a stack overflow due to the recursion? Are the operations "atomic" enough such that I'm sure that nothing can happen between the status boolean change and the status boolean check ? Thanks again
  12. Hi All, I am new to this forum so I hope I didn't break any rule writing my question here... My problem is probably trivial but I'm not sure how to implement it correctly. Basically I have a project where users can trigger some 90° box rotations (implemented as animations) by clicking on a button. Rotations work as expected, but problems arise when user clicks multiple times before previous rotations have completed. In this case, obviously, the following rotations start while the box is in the middle of previous movements therefore the final position of the box is not a multiple of 90° with respect to the initial position. I made a playground example to reproduce the problem: http://babylonjs-playground.com/#1NSSHK#0 I think I should use the callback function of the rotation, but I'm not sure how (I'm pretty new to javascript...) Thanks in advance