amorgan

Members
  • Content Count

    129
  • Joined

  • Last visited


Reputation Activity

  1. Like
    amorgan reacted to Deltakosh in [solved] Projection onto screen no longer working version 2.4 to 3.0   
    And as a lot of people asked this question I changed the toGlobal function to accept the old paramater as well  so no more back compat issue
  2. Like
    amorgan reacted to haestflod in [solved] Camera Movement Issue v3.0   
    In your app is your canvas focused?

    I added
    `document.getElementById("renderCanvas").focus();`

    and it works for me in the playground you have.
    http://www.babylonjs-playground.com/#3H5RJW#1
  3. Like
    amorgan reacted to Deltakosh in [solved] HDRCubeTexture and AssetManager   
    GOOOD news, I added a HDRCubeTextureAssetTask for you
     
    ping @Dad72
  4. Like
    amorgan got a reaction from Wingnut in Babylon Projects   
    Hey guys, it's been a little while since I have been on here, you know how the story goes. I also wanted to share a project I have been working on. It's mainly a WIP/PoC, but here is the link:
     
    http://randomdungeons.azurewebsites.net/
     
    w, a, s, d to move and spacebar to attack. Find the boss and kill him! There are only 3 types of enemies haha. Chrome for the best experience and if it doesn't seem to be loading, give it second haha. Otherwise enjoy. I might get back to adding more to it, but project, projects, projects...
     

     
    -amorgan
  5. Like
    amorgan reacted to Deltakosh in Action Manager and low FPS   
    Yep..@raananW is also working hard on improving the system (looks for Physics in playground search for dozen of examples)
  6. Like
    amorgan got a reaction from mkkc in Error while trying to load texture   
    I would put the file for the texture in the same directory as the .babylon file.
    If you exported this from Blender or other 3D software, check whether or not the program gives you an error, it should produce a log file. This should help indicate if it exported correctly.
  7. Like
    amorgan got a reaction from chroms3 in import scene   
    Since you are loading a scene, which seems to have been exported from a software like Blender. You will need to access them via
    var tankard = scene.getMeshByName('Circle'); Circle was the name given most likely from the program used to create the .babylon file. I found this by inspecting the scene.meshes array.
    Note the scene loader seems to be using the camera from the scene, which is why your code does not create a BJS camera and use it.
     
    Otherwise you will want to use the Asset Manager to load in the .babylon file and access the task.loadedMeshes array and assign it to an object.
     
    Then access the meshes properties, ie tankard.position.x = 10;
     
    Please refer to the playground (http://www.babylonjs-playground.com/# ) and the tutorials ( http://doc.babylonjs.com/tutorials ), which are really good resources to learn more!
  8. Like
    amorgan got a reaction from Deltakosh in Tranform from Parent Reference to World   
    Ah hah! I saw this in the documentation, but it was unclear to me how to use it.
     
    Exactly what I wanted. For completeness I did:
    // mesh is parented to camera before this line var worldMat = mesh.getWorldMatrix(); var newTranslation = new BABYLON.Vector3(); var newQuaterion = new BABYLON.Quaternion(); var newScale = new BABYLON.Vector3(); worldMat.decompose(newScale, newQuaterion, newTranslation); mesh.parent = null; mesh.rotationQuaternion = newQuaterion; mesh.position = newTranslation;  
    Thanks!
  9. Like
    amorgan reacted to Deltakosh in Tranform from Parent Reference to World   
    Hello, you should do something like this:
    var worldMat = mesh.getWorldMatrix(); var translation = new BABYLON.Vector3(); var quaterion = new BABYLON.Quaternion(); var scale = new BABYLON.Vector3(); worldMat.decompose(scale, rotation, translation); http://doc.babylonjs.com/classes/2.3/Matrix#decompose-scale-rotation-translation-rarr-boolean
  10. Like
    amorgan got a reaction from Deltakosh in beginAnimation, callback function and multiple animations   
    Awesome. Thanks Deltakosh!
     
    I will also confirm that it is now working as I expect it to.
  11. Like
    amorgan reacted to Deltakosh in beginAnimation, callback function and multiple animations   
    Here is it: https://github.com/BabylonJS/Babylon.js/commit/605f28e402902f1d072704b1cbff97d6832a04ae
  12. Like
    amorgan reacted to Dad72 in Playing multiple animations   
    Yes, there is a time when it was 'percentages' but now it is by 'keyframes'. but this has not always been the case.
  13. Like
    amorgan reacted to Temechon in Babylon Projects   
    During my hiolidays, I was looking to create a demo scene to test WebAudio integration in Babylon.js, so I did this:
     

     
    You can test it here : http://pixelcodr.com/games/dungeon/
    There is nothing to do for the moment, you've been warned I might add some rooms and create a game later.
     
    The source code can be found here: https://github.com/Temechon/Dungeon
    Feel free to fork, update, or use any assets if you need it.
     
    Spoiler alert: WebAudio works reaaaaally great
  14. Like
    amorgan got a reaction from Jaskar in Babylon Projects   
    Hey guys, it's been a little while since I have been on here, you know how the story goes. I also wanted to share a project I have been working on. It's mainly a WIP/PoC, but here is the link:
     
    http://randomdungeons.azurewebsites.net/
     
    w, a, s, d to move and spacebar to attack. Find the boss and kill him! There are only 3 types of enemies haha. Chrome for the best experience and if it doesn't seem to be loading, give it second haha. Otherwise enjoy. I might get back to adding more to it, but project, projects, projects...
     

     
    -amorgan
  15. Like
    amorgan got a reaction from Wingnut in Play Animation after looped Animation   
    relaX, would you be able to duplicate this problem using the playground?
     
    babylonjs-playground.com
     
    Unless Wingnut was able to nudge you in the right direction
     
    -amorgan
  16. Like
    amorgan got a reaction from Deltakosh in Babylon Projects   
    Hey guys, it's been a little while since I have been on here, you know how the story goes. I also wanted to share a project I have been working on. It's mainly a WIP/PoC, but here is the link:
     
    http://randomdungeons.azurewebsites.net/
     
    w, a, s, d to move and spacebar to attack. Find the boss and kill him! There are only 3 types of enemies haha. Chrome for the best experience and if it doesn't seem to be loading, give it second haha. Otherwise enjoy. I might get back to adding more to it, but project, projects, projects...
     

     
    -amorgan
  17. Like
    amorgan reacted to rodrigop in Babylon Projects   
    Hi Guys,
     
    I'm new to this forum as this is my first post, but i've being looking at BabylonJS for some months now and its awesome.
     
    I've being working at a side-project game called SpaceTrippers, and i'm open sourcing the project, hoping to get some contributors too.
    The code needs a lot of work but I hope it to be a nice and simple example of a full Typescript game using BJS. You can look at the source code at https://github.com/rodrigopivi/SpaceTrippers and a demo at http://space-trippers.herokuapp.com
     
    As this is an open project and there are still a lot of todo's feel free to contribute, you all are welcome here and if you can help with some code or ideas, that is awesome!, i'm hoping that at the end we can all have a shared example of a game that works at ios, android and windows.
     
    Cheers!
  18. Like
    amorgan got a reaction from vahith in how to avoid intersect collision with other mesh   
    http://www.babylonjs-playground.com/#VMFNH#5
     
    note, use mesh.moveWithCollisions()
     
    and assigning ellispoid to the meshes
     
    Cool demo!
  19. Like
    amorgan reacted to wikiwiggs in How to assign Multiple Actions on a Single Event   
    OK, that was amazing, and way more efficient from a coding perspective!
    Thank you for the help!
  20. Like
    amorgan got a reaction from wikiwiggs in How to assign Multiple Actions on a Single Event   
    I would use the ExecuteCodeAction, see example:
     
    http://www.babylonjs-playground.com/#DNOLK#3
  21. Like
    amorgan reacted to reddozen in Animations and Bounding Boxes   
    Anything to do with battle can basically be expressed as an attack range.
     
    If we want to take a boomerang as an example, it's just like the bullet in that you would look at position then range where range would define how big it is.
     
    I know what you mean though. It's a fight over accuracy, where you have to make a choice between exact hit vs estimation of hit.
  22. Like
    amorgan reacted to spritefire in Rotating objects origin   
    It adjusts the starting position but it also adjusts the center of which it rotates around (so no longer circling around the very center of the ground).
     
    *edit (oh I see the initialisation of the alpha will do this) thanks! (I still had x0 = 10 and z0 = 10 which is why it was no longer rotating around the centre)
  23. Like
    amorgan reacted to Deltakosh in Who's gonna write a book about babylon.js ?   
    @benoit: watch out my avatar
     
     
    I agree at 200% with Amorgan: please let us know what's missing from the doc point of view
  24. Like
    amorgan reacted to gryff in Blender and Animations Part 2   
    Glad it worked amorgan - I'm always afraid I will leave out a step or take one for granted.
     
     
    Not sure why you think that. What bone did you think you parented it to? I could not find a connection to any bone. If I tried to weight paint it - rather than give me a bone to paint - it gives me the whole armature.Perhaps I should have said the it was parented to the object you have named "Skeleton"
     
    As for the "two further things":
     
     
    As far as I know that is correct. Try this example:
     
    Desk and Book
     
    Click to the left of the closed book - the book opens!. This is because the book mesh was created as an open book (easier to rig)  - so its bounding box is for the open book. That was made with BJS v1.12 - things may have changed since then.
     
    When you animate an object with a rig you are rotating various groups of vertices of that object with each bone not the object itself. Think about this example:
     
    You attach an object to the hand bone just like you did the sword - a gauntlet - and it moves happily with the animation. Now you try to parent the sword to the gauntlet with
    sword.parent = gauntlet; In the animation, the vertices of the object are being changed not the position of the object itself - the bounding box is still the same - so the sword does not move with the animation. So when rigging you must attach each object to the appropriate bones - so for a backpack, use the spine bones.
     
    That is how I understand the animation process in BJS - now it is based on an older version 1.12.
     
    Maybe the code experts can explain it in a better way
     
    cheers, gryff
  25. Like
    amorgan reacted to Deltakosh in Blender and Animations Part 2   
    OMG, Gryff your knowledge is invaluable!