• Content count

  • Joined

  • Last visited

About Butterwell

  • Rank

Recent Profile Visitors

227 profile views
  1. Sprites don't consider parent's position?

    Never mind. I went with flat meshes. They will be superior when rearranging the board, anyway.
  2. Sprites don't consider parent's position?

    Well, I'd like to use sprites as part of a dynamic board. Having them all move together once placed would be a lovely thing.
  3. Unable to get Second Camera to Render to Material

    Wow. You rock. Thank you.
  4. Unable to get Second Camera to Render to Material

    That did help. Which is why I'm as far as I am. There is only one camera in that example, tough. I can get the first camera, pointed anywhere in the material. I can't seem to get a second to do, well, anything.
  5. I'm trying to get a rear view rendered onto a mesh. Here's one version that doesn't work, it uses the forward camera. I'd like to see the rear boxes in the upper left corner rather then the spheres. http://www.babylonjs-playground.com/#1DXLJL Any help is appreciated.
  6. BabylonJS, the game loop and "time"

    I found that using scene.getLastFrameDuration(); caused movement slowdowns (when multiplying rotation and translations by it) near large objects. I use this instead and everything is smooth: // Put this at the end of all the JavaScript, since it starts immediately.var clock = { before: performance.now(), getDelta: function () { var now = performance.now() var delta = now - this.before this.before = now return delta }}
  7. Behavior of objects different in playground

    And move everything into createScene, and... Tada! It works. http://www.babylonjs-playground.com/#RZ2XP#7 Compare #6 and #7 The essential difference is that everything is in createScene. Gotta love scoping.
  8. Behavior of objects different in playground

    Here's a version with no human interaction needed. http://www.babylonjs-playground.com/#RZ2XP#6
  9. Behavior of objects different in playground

    Notice, also, that the rendering position of the spheres (all uniform size) seems to be different from the camera clipping (terminology?) position of the spheres: they get no bigger yet disappear from view after a while.
  10. Behavior of objects different in playground

    Thank you, glad to be here. Sure. The cube is static at 0, 0, 0 global. The spheres "should be" static, I think. When served from my local machine (and when running from file://) the spheres are static. The camera is moving in conjunction with it's parent, "target". The sphere appears static because it's moving at the same clip as the target on the playground. You'll if you turn a bit to the left or right (arrow keys) and continue to generate spheres © you'll notice that each new sphere is generated a bit further away. (Again, on my local machine, they get generated right in front of the camera) My code might not be best practice for adding an object right in front a moving target/camera, and any pointers about how to do that another way are appreciated. (I thought it might be a version difference, but both the playground and locally I'm running v2.3.0-alpha)
  11. When I run this code locally, it's fine, the generated spheres "stay put". On the playground, the generated spheres move with the target (which is the parent of the camera). http://www.babylonjs-playground.com/#RZ2XP#4 Press "C" to generate spheres. Use arrow keys to change movement direction. If I were to guess, this is a difference in what happens with this code: var local_position = new BABYLON.Vector3(0, 0, 0) local_position.z += 40 // Local to World Transformation var to_world_transform = target.getWorldMatrix() var place_at = BABYLON.Vector3.TransformCoordinates(local_position, to_world_transform); (As a side note, how does one get the BABYLON version string?)