• Content Count

  • Joined

  • Last visited

About Azariel

  • Rank

Recent Profile Visitors

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

  1. So assuming that I have 5 blocks in the world initially set to be in mid-air and there is gravity, if I call "mesh.computeWorldMatrix" on all of them 10 times, they will all have moved downward the equivalent of 10 frames?
  2. So I was wondering if it was possible to have Babylon simulate world states faster than they can be rendered to the screen. For example, if I wanted to create thousands of towers of blocks at random, and test if they were balanced or unbalanced (i.e. that they would stay upright on their own, even under the influence of gravity) I could do that with what I know of Babylon right now, but it would require leaving it to run for a very long time. Is there a way to have it step through the world state without needing to render to the screen, and without taking as long as a frame ordinarily would?
  3. I was wondering if there was a way to change or turn off the gravitational forces applied to a specific object. Right now my janky solution is to change the object's mass, but when setting it to 0 it appears that collision detection no longer works (at least when both objects involved in a collision have 0 mass). Are there any better solutions out there?
  4. Figured it out. Easiest way for me was to use the event object provided by pointerDragBehavior.onDragObservable. There's an "" object that has the change in coordinates since the last frame or update step, which is basically velocity already.
  5. So I want to make a little physics-based playground where you can move objects around by clicking and dragging them, and throw them in a realistic way by releasing the mouse button while moving the mouse cursor. Right now I can move the objects around with "pointerDragBehavior", but when I let go of the mouse button the object just drops like a stone. It would be nice if there was a built-in way to see the speed (and vector) of a dragged object's motion, since then I could just impart that linear velocity onto the object. What is the best way to measure a dragged object's speed?
  6. So positionGizmos have simple hooks into the dragBehavior, with onDragStartObservable and onDragEndObservable methods. BoundingBoxGizmos don't seem to have any equivalents when it comes to basic repositioning; how can I monitor whether the boundingBoxGizmo is being dragged?
  7. So I have a scene that I got from another person that I've exported from Blender into Babylon, but whenever I try to render the scene dynamically it falls straight down. Changing the physics of the scene in Babylon doesn't seem to work, nor does creating a ground object with collisions enabled. I've attached the scene in question; what am I missing? example.babylon