Spankied

Members
  • Content count

    55
  • Joined

  • Last visited

About Spankied

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Spankied

    Getting Started With The Babylon Toolkit

    Whens the next one?
  2. Spankied

    Navigating while animating

    Lol good looks mate. I'll have to check all this out when I get home. Much appreciated.
  3. Spankied

    Navigating while animating

    @MackeyK24 saves the day. Will be looking out for those unity videos.
  4. Spankied

    Navigating while animating

    @satguru https://imgur.com/a/sPDz9nm
  5. Spankied

    Navigating while animating

    moveWithCollisions takes a velocity. The nav-mesh library outputs an array of positions. My question is how do I move a player using this array of positions. Using begin animation, I can set which position player should be at, at certain frames. This works well except I can't animate position and skeleton at same time. Halppp!1
  6. Spankied

    Navigating while animating

    @MackeyK24 the issue with the toolkit are the docs. The getting started video link is broken, and I remember just seeing " please refer to unity docs" everywhere. I think there were a few examples, but some felt incomplete or were just api references. I havent watched a udemy course in like a year, but If u released one on the toolkit I would definately get it. Any video u release on the toolkit I'll watch, especially those in regards to navigation and animation. Idk why collision meshes or impostors never crossed my mind. Makes so much sense after reading ur post. I want to incorporate both lookAt functionalities u mentioned, but for now, just the second one, turning the capsule to face the movement direction. Is there another function other than lookAt u would use? If i moveWithCollisions to a point I can just look at that point before moving, but how would I do this for a player.position animation over an array of points? To elaborate on last question, moveWithCollisions only moves to one point, that's why I began an animation on the player.position value and made some frames for each point along the path, then play all frames. How would a moveWithCollisions refactor look? Does project.js also import the navigation-mesh library? If so how are u able to load it in the playground, I checked the navmesh library file and it tries to require a bunch of dependencies which the playground didn't like. Thanks for ur response Mackey
  7. Spankied

    Navigating while animating

    @Sebavan I want to provide the most natural looking experience. My biggest concern for now is getting the skeleton animations to play along with the position animations/transform.
  8. Spankied

    Navigating while animating

    @Sebavan The tutorial and github repo got me here. Not sure what you mean when you say lookAt will need some epsilon to not look shaky. My question with lookAt is how would you implement it? Would you look at path points, or subdivide between points, and look at subdivisions? And how would u know when to look at a point, would u constantly check if the player has reached certain points?
  9. Implementing click navigation. Trying to get skeleton animations & path navigation to work nicely together. I start the player walkAnim and then begin animating player.position along a path. The walkAnim is promptly interrupted and the player glides along the path, after which he continues walkAnim for a short time. I considered moveWithCollisions, but It navigates to a point, not an array of points, I would have to loop over the path array and check whether or not Ive reached a point, then moveWithCollisions to next point in path. Starting to feel out of my league so decided to share my woes with all you. The bablyon-nav-mesh file require()'s alot of dependencies and I was unable to import the library into a playground ( https://www.babylonjs-playground.com/#EZSYWY#1), so I'm just gonna post some code here. BABYLON.SceneLoader.ImportMesh("","https://rawgit.com/Spankyed/sched-proto/master/src/assets/player/","dummy3.babylon",scene,(meshes,particleSystems,skeletons)=>{ var skeleton = skeletons[0]; skeleton.enableBlending(0.2); player = meshes[0]; player.skeleton = skeleton; player.position = new BABYLON.Vector3(-2.7426157086231813, 0.32968033243017736, -5.410392414960055); player.checkCollisions = true; canvas.addEventListener('click', function(event) { var pickingInfo = scene.pick(scene.pointerX, scene.pointerY); if (!pickingInfo.hit) return; var walkRange = skeleton.getAnimationRange("YBot_Walk"); var walkAnim = scene.beginAnimation(skeleton, walkRange.from, walkRange.to, true); var path = navigation.findPath(player.position, pickingInfo.pickedPoint, 'level', navigation.getGroup('level', player.position)) || []; console.log('path', path) /*if path is defined, create path animation frames and beginAnimation on player*/ if (path && path.length > 0) { var length = 0; var direction = [{ frame: 0, value: player.position }]; for (var i = 0; i < path.length; i++) { length += BABYLON.Vector3.Distance(direction[i].value, path[i]); direction.push({ frame: length*100, value: path[i] }); } for (var i = 0; i < direction.length; i++) { direction[i].frame /= length; } var move = new BABYLON.Animation("CameraMove", "position", 180/length+10, BABYLON.Animation.ANIMATIONTYPE_VECTOR3, BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); move.setKeys(direction); player.animations.push(move); scene.beginAnimation(player, 0, 100); } }) engine.runRenderLoop(function(){ scene.render(); }); }); While I'm here wanna throw out two other questions I have yet to conceive an answer for. How to smoothly adjust the player to lookAt points along its path? How would key controls(wasd) be implemented in conjunction with a click navigation system? Create small incremental paths?
  10. Spankied

    gizmo

    Whats difference between this and Ssatguru's edit control, https://github.com/ssatguru/BabylonJS-EditControl?
  11. Spankied

    Data Visualization Authoring Tool

    So must of the styling is custom? Very nice.
  12. Spankied

    Data Visualization Authoring Tool

    what UI library are u using?
  13. Spankied

    Retargeting skeletal animations at runtime

    did this ever get integrated?
  14. Spankied

    BabylonJS CharacterController

    How does the controller know which animation ranges on your avatar correspond to walk/run/slide etc? In other words, how do you retarget animations to a new skeleton? Edit: figured it out from demo/index.html function setAnimationRanges(skel){ delAnimRanges(skel); skel.createAnimationRange("fall",0,16); skel.createAnimationRange("idle",21,65); skel.createAnimationRange("jump",70,94); skel.createAnimationRange("run",100,121); skel.createAnimationRange("slideBack",125,129); skel.createAnimationRange("strafeLeft",135,179); skel.createAnimationRange("strafeRight",185,229); skel.createAnimationRange("turnLeft",240,262); skel.createAnimationRange("turnRight",270,292); skel.createAnimationRange("walk",300,335); skel.createAnimationRange("walkBack",340,366); }