Raggar

Members
  • Content count

    326
  • Joined

  • Last visited

  • Days Won

    1

Raggar last won the day on May 6

Raggar had the most liked content!

1 Follower

About Raggar

  • Rank
    Advanced Member

Recent Profile Visitors

2,462 profile views
  1. Raggar

    DroneZ

    I tried that in other games. Never understood why invert_pitch invert_yaw invert_roll
  2. Raggar

    DroneZ

    https://raggar.co/dronez/ [WASD]+Mouse I needed a break from my multiplayer game, so I spent a little over a week making a little mini-game. Created using BabylonJS and CannonJS. No objectives. Just shoot the enemy AAs and drones. - Tested on Chrome and Firefox @ Windows - There's a bug resulting on some AAs being invincible. - Much of the code could be rewritten and optimized. I actually made a tank as well as a jet, so I might revive this project at some point. I have a little 2-day mini-project in mind first, though.
  3. Raggar

    Fastest way to display fps

    You have to create an HTML element and assign it an ID of "fpsLabel". <div id="fpsLabel"></>
  4. Raggar

    Charging particle effect

    You can change the direction of all the individual particles. Change them to a direction vector based on the positions of the particles and the emitter, like this: https://www.babylonjs-playground.com/#WBQ8EM#11
  5. At some point, the setScale function was changed to require a vector3 instead of 3 separate parameters. This works. I removed the initial scaling of the bones, as it happens in the loop anyway. http://playground.babylonjs.com/#94EHM5#2
  6. Nah. Mistake on my part. I meant the other way around as well. Jesus..
  7. Same thing can happen if you load CannonJS before BabylonJS.
  8. Hmm. Maybe it due to the speed of the physics stepping, and the intersection happens outside BabylonJS's own loop? I'm not sure, though. Here's an example using the beginContact, endContact and collide events. bodyA and bodyB are both null in the returned object, though. I have this issue in my project as well, although both bodies are registered correctly in NodeJS, which is weird https://playground.babylonjs.com/#0H29AJ#41
  9. In that case, the pistol will only be represented by a box, and not a compound shape like an L.
  10. Couldn't quite get it to work using the impostor system. Look at this PG ported to native CannonJS: https://playground.babylonjs.com/#0H29AJ#40 You see, the sphere is too quick to be registered at the physics steps. Now try this version with the updated version of CannonJS(You might have to CTRL+F5 + RUN for it to properly run the new CannonJS file): https://playground.babylonjs.com/#0H29AJ#39 Even with a power of 500, it registers the hit.
  11. I think the intersectsMesh issue is due to being checked only if the space/f buttons are pressed. Even if they ARE pressed, it still doesn't seem to register, but moving the check outside buttondown-check seems to work: https://playground.babylonjs.com/#0H29AJ#29 Edit: A little work on the reset: https://playground.babylonjs.com/#0H29AJ#30 It still behaves oddly if you quickly fire before the ball is reset, though. Edit2: Might not be the best option, but this fixes the odd behavior for now: https://playground.babylonjs.com/#0H29AJ#32
  12. For the onCollide callback, you could always use the more hacky way of adding the event to the CannonJS body itself: bullet.physicsImpostor.physicsBody.addEventListener('collide', function(){ console.log("collide"); }); Now, the issue with bodies going through walls/other bodies is the reason I changed from projectiles to ray-based shooting in my projects. Take a look at the following issue: https://github.com/schteppe/cannon.js/issues/366 With the following video of CannonJS with CCD implemented: This ensures that bodies don't clip through other bodies between steps due to high velocities. I haven't tried it myself, but it's worth mentioning, if you feel like building CannonJS with those improvements.
  13. In this case, it looks like the merging of the meshes messes with the impostor system. It creates a single shape with the following halfExtents: x: 0.1 y: 0.30000000596046444 z: 0.5000000029802323 And this does not quite match the L-shape you are trying to achieve. What you want to do instead, is create a compound-shape by using the parent-child system in BJS: https://www.babylonjs-playground.com/#RAYW6X#2
  14. Raggar

    Efficient collisions versus terrain

    You will need getNormalAtCoordinates in case you want your object to be rotated according to the normal it sits above. This normally isn't necessary with player and NPC meshes, but could be used for dropped items, pickups etc. It does add a bit of realism, in case you have uneven terrain. Unfortunately I can't find my own benchmark project. I did some testing with CannonJS vs. moveWithCollisions vs. getXAt vs. my own simple physics implementation. Edit: Quick test: http://playground.babylonjs.com/#BLAJPA Without rendering the instances it can easily calculate the height of 8000 objects. Didn't try higher than that, but with 60 fps it shouldn't become an issue. The real issue is if those objects have to collide with each other + walls, props etc. If they do, I guess you'll have to divide your world into a grid as you already mentioned, and only test every individual grid, to prevent massive calculations.
  15. Raggar

    mmorpg advice 3d edition

    It really depends on the type of game, and how much action, how many players and how many NPC's you plan on supporting. Personally I would start with a simple NodeJS + Websocket server. If your game then becomes so popular you need to scale, you can take a look at other solutions like pomelo. I've never heard of it before, but it does look promising. I might just have to try it out, in case I ever get to make an MMO-style game. It does seem to be pretty well-documented, and looking at their benchmarks, it doesn't seem bad at all. I have a for-fun MMO in my mind right now, that I would like to try out at some point. Keeping physics on the client, and then most logic and sanity-checks on the server.