• Content Count

  • Joined

  • Last visited

About kevzettler

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Recent Profile Visitors

741 profile views
  1. @RaananW hahah yeah I should have looked harder. Got it all sorted out though thanks for the help everyone!
  2. This is out of my Math skill set at the moment. I am casting rays from on an event. I want to draw a plane along the ray.
  3. Ok thanks for clarifying. Is there a helper I can use to draw the Ray to confirm?
  4. @RaananWWould the mesh show up in the predicate if it wasn't being hit? scene.pickWithRay(ray, function (mesh) { //The mesh I want is available here });
  5. I'm trying to pick a mesh with Scene.pickWithRay and having problems. var pickResult = scene.pickWithRay(ray, function (mesh) { if (mesh.voxelData) { debugger; return mesh; }; }); var mesh = pickResult.pickedMesh; //Get the mesh picked I can trigger the debugger statement no problem with the mesh I want. The mesh looks like it has the required properties: mesh.isPickable true mesh.isEnabled function (){return!!this._isEnabled&&(!this.parent||this.parent.isEnabled())} mesh.isEnabled() true mesh.isVisible true I'm not sure what to do in the predicate function. The docs could be more clear: I've tried returning true and returning the mesh. Both situations `pickResult.pickedMesh` is undefined.
  6. Babylon was mentioned a few times during the Khronos group talk I went to on Gltf
  7. Would be cool to meetup and talk Babylon
  8. thanks @Deltakosh I was able to get the effect I want by doing focus = arcCamera.getFrontPosition(100); focus.y = 0; focus.multiplyInPlace(negativeVector); mesh.lookAt(focus); How do I move the camera towards that direction? I'm currently moving the mesh with mesh.translate when keys are down. I want to do the same movement with the camera. Seeing the camera dosen't have a translate method
  9. @Deltakosh I'm having a hard time reproducing my setup in the playground environment. Playground is using v2.6-alpha I'm not on the same version. Actually I'm not sure what version I'm using is there a value I can check? Even so seems like coordinates are different between the two environments. Here's my best attempt at reproducing Here's a better example on my production environment http://localhost:8000/robotbones/attempts/babylon/babylon-bones-qubicle-CEWBS/ Essentially I want the character to face the direction the camera is facing on rotate. I thought I could maybe use the alpha from the rotateCamera but maybe I can take the a direction vector from the character to traget and apply that to the character instead.
  10. I have looked at ArcFollowCamera it dosen't seem to be working for though. Once attached to a target to follow I cannot control it. I setup a playground here Also to get the desired effect I want, I would still have to rotate the target mesh based on the ArcFollowCameras alpha.
  11. I have an ArcCamera with a root object as it's target. I'm going for a 3rd person or "over the shoulder camera". I want the root to rotate on the y axis when the ArcCamera moves on the alpha axis. I'm currently doing something like: It seems like the alpha is at a lower magnitude than what the rotation vector expects. I can rotate the camera like 3 times around the root before it rotates completely
  12. I created a PR here:
  13. cool thanks @Deltakosh I think you need to update ArcFollowCamera while you're at it too :
  14. Thanks @Deltakosh, looks like the mesh is now attached to the bone. Going back to the original question, I have updated the PG to use FollowCamera and target the TargetDummy mesh, see Unfortunately, it does not actually follow the meshes position. I see in PG#22 there was a condition added to the render loop: This forces the camera to target on the meshes "absolute position" each frame. If I log TargetDummy.position and Target.getAbsolutePosition() I see that .position is never updated its always {x: 0, y: 0, z: 0} Unfortunately, it looks like FollowCamera internally assumes mesh.position is updated. see: So I don't think this will work without a method of updating the target's position or updating FollowCamera to use getAbsolutePosition()
  15. Hi @Deltakosh Thanks for helping with this. I'd rather you spend your time updating Babylon, much appreciated Do you mean the "Head" mesh and bone? I added log output showing that they are objects How else can I verify? var headBone = skeletons[0].bones[skeletons[0].getBoneIndexByName('Head')]; var headMesh = scene.getMeshByName('Head'); console.log(headBone); console.log(headMesh); Again which mesh to which bone? The "Dummy" mesh or the "Head" mesh. How do I verify? These meshes and bones are exported straight from Blender. I have not manually attached them in Babylon. I also enabled an animation. The animation would not play if the bones were not linked, correct?