• Content count

  • Joined

  • Last visited

About agmcleod

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Recent Profile Visitors

652 profile views
  1. Hi there, I was trying to generate some quat values i can use for fixing the rotation of a cube. Though I found that: (new BABYLON.Vector3(0, 0, degToRad(90))).toQuaternion() Results in the same quaternion as: (new BABYLON.Vector3(degToRad(90), 0, 0)).toQuaternion() Is this intended? Or is there a bug in the function?
  2. Gave it a try, having both BABYLON & CANNON setup through the expose-loader seems to cause an infinite loop of rebuilds from webpack. I tried just putting in cannon, and removing my window hoist, but it doesn't seem to get found by babylon. May just keep my window hoist hack instead.
  3. Oh damn, that's pretty cool. I actually just tried hacking it with: window.CANNON = CANNON, which worked :D. But I feel like that's a more modern way of doing things.
  4. @Hersir Yep! Using webpack2 & yarn. I added the babylonjs and cannon packages as dependencies. At the entry file, i would have import BABYLON from 'babylonjs' import 'cannon' The BABYLON instance seemed to work okay, but yeah things fell apart when it tries to load the inspector. As it expects BABYLON to be global. I suppose I could hoist it to WINDOW maybe, but that sounds not so smart Giving it another try this morning, seem to have trouble loading the physics plugin. The version I did with just injecting the script tag, is using a build i downloaded, which includes cannonjs. So not sure if I need to bootstrap that into Babylon somehow.
  5. Hi there, I'm using babylon for a little prototype project, and I tried getting it through npm. It & cannonjs installed just fine, but pulling them in for a project leads to some issues. The inspector panel throws errors do to BABYLON not being global for example. I like having it through the package, as the tooling is better around it, VSCode autocomplete for example. For now i've just gone the route of including the script files.
  6. Ah, just responded to your PM. Yeah you should be able to simply do:; That will keep the container itself intact, but just detached from the game world.
  7. You downloading from this page? It's possible something was wrong with github.
  8. Be sure you the z-index isn't getting overwritten. `me` is in global scope, so you can access the game world in realtime via developer tools. Traverse the scene graph, and see what the z-indexes are. Figure out why the images arent appearing above.
  9. Not too sure of the specific answer, but be sure to keep in mind that the sprite positions will be world based, and you need screen based. Further more, if the canvas doesn't take up the whole screen, you'll need to account for the offset position relative to the html body of the canvas element itself.
  10. For UI, it's best to use an instance of me.Container, with the floating set to true. floating means it will use screen coordinates, not world coordinates. Implement the draw method of each container to have a semi transparent opaque white background. draw() is passed the renderer, which has methods for setting alpha, and drawing coloured rectangles. Be sure when overriding draw() on a container to call the super method as well. From there, add each of the menus as a child. I would then have the slide out menus as another container, and then show/hide them based on clicks of the main menu items.
  11. I would probably use a single game state actually. Where the movement aspect would be one instance of me.Container, and the fight would be another me.Container. That way you can remove and add those as you please, leaving them in the previous state that they were in. The me.state stuff is fairly destructive, the idea is it removes everything. You could potentially setup an instance of me.ScreenObject to handle reloading the state in onResetEvent, but personally i think managing separate containers might be easier
  12. Can reproduce, just running the webpack command through terminal. I wonder if maybe it's a bug with at-loader?
  13. Not sure of the answer as I have yet to work on an isometric game, but for debugging it, I would see how the coordinates turn out for your addPoint calls, and compare them against the ones of the blue tile. It might be worth noting, that one needs to generally convert screen coordinates to world coordinates.
  14. Are your HUD elements drop targets? If they're just drag targets it should work fine. In what way is it getting attached to the previous image? Some code & screenshots can help us help you
  15. Could it be that the dragEnd is some how firing on those other entities as well? Have you tried logging to see which IDs are getting removed? Entities should have a this.GUID property available.