dunk

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. I just discovered the new forum. Let's use that instead. https://forum.babylonjs.com/t/camerainputmanager-support-for-followcamera/592
  2. Here's a start that adds keyboard bindings to `FollowCamera`: https://github.com/mrdunk/Babylon.js/commit/e0cecc50caf425bee0b5d4ffbb68bc74ed480214 Is this something that's worth pushing? I've modeled it after `arcRotateCameraInputsManager`. I'm new to Babylon so feel free to make suggestions. To test, put the following in `localDev/src/index.js` or Playground: var createScene = function () { // This creates a basic Babylon Scene object (non-mesh) var scene = new BABYLON.Scene(engine); // Our built-in 'sphere' shape. Params: name, subdivs, size, scene var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene); var frameRate = 10; var xSlide = new BABYLON.Animation("xSlide", "position.x", frameRate, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); var keyFrames = [ {frame: 0, value: 2}, {frame: frameRate, value: -2}, {frame: 2 * frameRate, value: 2} ]; xSlide.setKeys(keyFrames); scene.beginDirectAnimation(sphere, [xSlide], 0, 2 * frameRate, true); // This creates and positions a free camera (non-mesh) var camera = new BABYLON.FollowCamera("camera1", new BABYLON.Vector3(0, 0, 0), scene); camera.lockedTarget = sphere; // This targets the camera to scene origin camera.setTarget(BABYLON.Vector3.Zero()); // This attaches the camera to the canvas camera.attachControl(canvas, true); // This creates a light, aiming 0,1,0 - to the sky (non-mesh) var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene); // Default intensity is 1. Let's dim the light a small amount light.intensity = 0.7; // Move the sphere upward 1/2 its height sphere.position.y = 1; // Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene var ground = BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, scene); return scene; }; dunk.
  3. Old topic but i'm experiencing this as well with my own scene. My character's head flips between the `BoneLookControl` position and the animation's position in quick succession. Interestingly i do not see it when i use one of the playground's provided scenes (The Dude): https://www.babylonjs-playground.com/#QY1WYT#43 (Click on the ground to have his head move.) This leads me to think the Dude probably doesn't have rotation data for his head in the animation like my model does... PM me if you want a link to my model demonstrating the issue. thanks, dunk.