ewanvalentine

Members
  • Content Count

    11
  • Joined

  • Last visited

About ewanvalentine

  • Rank
    Member

Recent Profile Visitors

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

  1. Ahaaa that looks so useful! I guess I could use that for terrain elements. I've also updated it to use `Mesh.clone(name)` instead of creating a new mesh each time. It seems to be running a little smoother, albeit still very slow :/ Thanks for the advice!
  2. Hi folks, Babylon.js/game dev n00b here. I've started attempting to make a real-time strategy game, similar to Red Alert or Starcraft. So far, I have a bunch of blocks you can create and move around a flat map. I'm just posting this here so I could get your feedback, or suggestions, am I doing anything obviously wrong? https://github.com/ewanvalentine/game-guild Cheers, Ewan
  3. Ahhh great spot! Perfect! Thanks everyone else, I'll look into your suggestions as well. You've all been a big help Cheers, Ewan
  4. By the way, I've updated my example: http://www.babylonjs-playground.com/#OYE6Q#8 As you can see, my moveable object still passes through the static object.
  5. @ViBe Your example is EXACTLY what I was attempting to do! I went through the thread you linked me to, but I'm still confused. That thread seems to suggest using `mesh.position` which is ignored by the physics engine. So when I attempt to use a few of those suggestions, I still run into the problem whereby my mesh passes through static meshes, instead of moving around them such as your example. Hope this makes sense. I'm attempting to create something similar to Red Alert in terms of movements and physics.
  6. Hi folks, I have the following example... http://www.babylonjs-playground.com/#OYE6Q#4 I was wondering how I'd go about moving the smaller mesh around the plane, by clicking on it, then clicking on a different point in the plane, but in such a way that it uses the physics engine. Currently, if I set another block to having 0 mass, so that it's static. The smaller moveable block passes through the static block. I understand that this is because, animation doesn't actually use the physics engine. So I was wondering if anyone knew how to replicate this behaviour, but using the physics engine. I attempted to use 'applyImpulse' but that seemed to be for applying constant force, such as onKeyDown. I'm a total n00b to game dev and to Babylon, so any help is hugely appreciated. Cheers, Ewan
  7. @Deltakosh I understand what you're saying, that makes a lot of sense. What would you suggest instead? Some people I've seen use `applyImpulse` but that seems to make my meshes fly around erratically.
  8. @RaananW I think I understand what you're saying, so things like 'animate' and simply changing the position are ignored by the actual physics engine. In your examples, the box moves around erratically and jumps all over the place. Is there away to just make it move from its current position, to a picked point, smoothly? Thanks so much for you help! I'm a complete n00b to game dev, and Babylon. Cheers, Ewan
  9. Just out of curiosity, if I set mass to 0, on an object I want to be static. Moveable objects, or objects with a mass of 1 or more, are now able to pass through the static object. In other words, a mesh seems to lose all of it's physics completely. Unless I've misunderstood something. Here's an example! http://www.babylonjs-playground.com/#OYE6Q#4
  10. Thank you so much! That's much smoother, that makes a lot of sense. One issue I'm having now, using animate. Is that, if I have a static mesh with 0 mass, other meshes can pass through them, if that makes sense... http://www.babylonjs-playground.com/#OYE6Q#4 In that example, you can move the moveable mesh through the static mesh, instead of avoiding it. I tried a few different things, but couldn't find a clear cut answer anywhere. Any help greatly appreciated! Cheers, Ewan
  11. Hi folks, My first post on the forum, so hello all! I'm been playing around with babylonjs. My intention is to make a Red Alert style game, mostly just to improve my JS skills, and learn the basic concepts of game development etc. However I've struggled to find a best approach for moving meshes around a ground plane. I'm essentially trying to animate a block to move from a selected mesh's initial point, to a selected point. But the movements happen immediately, and feel 'buggy' in my example: http://www.babylonjs-playground.com/#OYE6Q Any help much appreciated! Cheers, Ewan