Jump to content

Search the Community

Showing results for tags 'cannon.js'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 21 results

  1. There is a problem in different browsers, for example, if a roulette ball in Chrome stops at a certain number in another browser, it stops at another. Can the difference between physics world.step (cannon.js) in different browsers?
  2. Hello all, I've been working through a project (using a lot of advice I've found from lurking here) and I've run into an issue. My goals are pretty modest; I'm trying to 1) have a natural jumping mechanism, and 2) have collision detection between the camera, ground, walls, etc. At first I did this just using Babylon's .checkCollisions, which works very well for camera vs object and camera vs wall collisions. However, I couldn't get this to work properly for jumping. Even following other's tutorials, (http://www.html5gamedevs.com/topic/12198-camera-jump/) I wasn't getting the results
  3. So, I'm looking for ways to create a ragdoll effect using Cannon.js, and (preferably) a skinned, imported mesh. I tried the following 2 methods: #1: Use getRotation/position/absolute.. etc on the bones, to match with the Cannon bodies. This doesn't seem to work like it does the other way around (Match Cannon body to bone position and rotation). #2: Split my model into the different body parts, so each and every limp can be used seperately. This 'can' work, but requires a lot of work, and won't look as good as on a skinned model. Here is an example of a ragdoll, sh
  4. Hello there! Long time lurker, first time poster here... In the following example: http://www.babylonjs-playground.com/#1NASOD#13 Why does the sphere mesh overlap (or fall slightly into) the box mesh as the box moves upwards? Is there a way to make the sphere not overlap the box as the box moves the sphere upwards?
  5. Is it possible to add a physics impostor to a free camera with cannon.js that allows it to collide with rigid bodies just like any other mesh that has a physics impostor? I also need the free camera to maintain the standard keyboard/mouse controls.
  6. This is my current setup: .Player presses the Mouse button .A Ray is fired using Babylon and the players camera The intersection point (vector3) is sent to the server The server uses Cannon to do it's own intersection testing (Using the player's head hitbox(Same location as the camera client-side) as the origin point, and the vector3 from the client as the target point. Now, if I wanted the server to be a bit more authoritative when it comes to hit detection, I shouldn't send the point from Babylon, but rather a 'fire' command, and, somehow, calculate a point th
  7. This is a (sort of) port of the Three.js vehicle demo using Cannon.js, in case someone is looking for vehicle physics or just want to play with it. I made some weird choices like sperating the renderLoop and the postStep, and some quesswork here and there. And some options are left out, but can easily be added by looking at the Cannon.js docs or logging the vehicle object itself. This includes ConnectionPoints, which wheels steer, back or front wheels etc. Just play with the options, and press the "Run with Options" in the bottom of the Dat.GUI. http://www.babylonjs-playg
  8. First of all here is my project, controls are WASD and mouse. http://playground.babylonjs.com/#11OMIX#26 I was wondering what is causing some kind of friction between the ground and a tank, try to press A or D for 5 seconds, it will not turn smoothly, I noticed that the glitch occurs when the tank is on X or Z axis (probably also on Y axis too but I didn't try). You can see that wheels are rotating propertly, there are no forces pushing the hull, just wheels are jointed to it. Any ideas?
  9. Hi, I am a beginner to Babylon.js, but I decided to create a game about helicopter and... I don't know what to add next. Here you can see the latest update: http://playground.babylonjs.com/#11OMIX#23 The CONTROLS are: -Arrows to tilt the helicopter -W/A to fly up/down -S/D to turn left/right -Spacebar (press) to change perspective You can pick up the minecraft block by landing on it. Crash into buildings (yes, these big blocks). If you have any ideas how to develope this project let me know in comments. I am pretty sure I will need help with placi
  10. As I don't have an external server at the moment, I'm trying to fake a bit of latency using SetTimeout. The code is based on Gabriel Gambetta's code for handling an authoritative server: http://www.gabrielgambetta.com/fpm_live.html And yeah. I know the code is very ugly and prototypish, no handling of multiple users, etc. etc.. I am sending inputs as well as the time the key is pressed, as a way of making it time-independent, but I have no sanity checks. If I keep the networkLatency at 0, it seems to run very smoothly, and both reconciliation and prediction works ver
  11. As my little project is done using Babylon, I thought this would be the most fitting and active section. If not, mods may move the topic as they please. I am unsure as to how it is possible to apply Server Reconciliation when using physics to drive the movement, as I am using Cannon.js. The examples I've seen on SR are based on movement, by first applying the confirmed position, followed by applying all the unconfirmed input, and thereby smoothing the movement of a local player in a multiplayer setup. I don't really see how this is possible, as by far as I know, Cannon won't be
  12. 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
  13. I need some simple pointers on how to turn an imported model into a Cannon.js heightfield. I would prefer this over actual heightmaps, as I feel that I'm more in control of the design of the ground. I made a simple PG example so I can test it along the way. Just a very basic model made out of a 20x20 plane. How would you pull the positions(Especially Y) on the individual vertices, so they can be used to create the heightfield shape and added to a Cannon.js body? This is the relevant code from the heightfield demo: var matrix = []; var sizeX = 15,
  14. I have trouble getting the code to work properly in the playground, so I hope you get an idea of what I mean. I'm using cannon direcly, and not as the plugin in Babylon. I have a cannon body and a sphere shape, and I'm controlling the movement on the X and Z axis using keyboard input. On top of that I have a sphere mesh in order to verify the changes to the body. Now, I use the below handler to rotate the body itself according to the mouse. window.addEventListener("mousemove", function(e) { // console.log("mouse"); var movem
  15. I have absolutely nothing to do with the following code, I just thought I wanted to share it, and I was slightly unsure as to which section this was best suited. https://github.com/mfosse/multiplayerFramework it.s 1.6GB with models, sounds etc. http://f1v3.net/mmo/ I haven't been able to load the hosted game, though, so I guess something is down. I just wanted to share it, as it seems to implement an authoritative model, with physics and hit detection done on the server. And I'm pretty sure this is something quite a few users are looking for, based on threads on the fo
  16. Okay, so I'm playing around with some vehicle-rigs, and the ones I found on the forum/the playground use spheres as wheels, where as I'm trying ti use the more traditional cylinders instead. Here I have created cylinders instead of spheres: http://www.babylonjs-playground.com/#IIIVB#1 I have commented out the cylinder imposter, and went with the sphere one, as it doesn't make much of a difference at this point. What I'm trying to achieve, is making the rotation of the cylinder more in the likes of a wheel, but no matter how and where I try to rotate the wheels, they just don't s
  17. I'm sure there's a simple solution to this issue. I'm trying to shoot a bullet from the turret of a tank, in the direction that the turret is pointing. I made this simple scene. to demonstrate what I mean: http://www.babylonjs-playground.com/#2IRUGC#2 As you can see, I created a very basic tank, and placed a bullet (sphere) just behind the turret. In front of the turret is a Box mesh( bPoint1 ). I was hoping I could somehow shoot the bullet in the direction of the bPoint, in order for it to "appear" to be shot from the turret. I made the turret spin ever so
  18. Hello, I am a bit new to this, but have a working hockey rink with a puck and walls that stop the puck, but it seems I cannot use any other impostor shape other than sphere on my puck even though it is defined as a cylinder when created. Thus, the puck ROLLS along the ice instead of sliding like a puck. Here is a bit of code for the puck and ice. ice = BABYLON.Mesh.CreateGround('ice', 200, 85, 2, scene); puck = BABYLON.MeshBuilder.CreateCylinder("puck", {diameter: 0.3, height: 0.1, tessellation: 32}, scene); ... ice.physicsImpostor = new BABYLON.PhysicsImpostor(ice, BABYLON.Physics
  19. Hello everyone, I'm trying to implement the Cannon.js physics engine into a Babylon.js scene. For some reason it's giving me weird problems: If, for example, I try to create a "BABYLON.CannonJSPlugin" and then use "setTimeStep(number)" it throws an exception. Another thing is that if I use "scene.enablePhysics(gravityVector, physicsPlugin)" and then "scene.getPhysicsEngine()" it returns null. I use Babylon.js version 2.3 and I'm building the scene in Microsoft Visual Studio 2012. Any ideas on what may cause those things? Thanks in advance. @RaananW I'm tagging you b
  20. Hi gang, I just pushed an update to the cannon.js plugin to be conform with the newest cannon.js version (0.6.2). Babylon.js 2.3 will support this version only. Running a few tests, cannon.js is actually very nice to use. And the new version fixes bugs the old one had. Try using it and see if it fits your needs. BTW - Comparing both engines using the same scene and configuration might not be 100% correct. I have noticed each engine has different "units" to friction and restitution (and impulse application). Changing the plugin to cannon or oimo should get things to work, but the phzsics co
  21. Hi Everyone, Here is my latest game, called Crokinole. This is a dexterity board game similar in various ways to pitchnut, carrom, with elements of curling reduced to table-top size. I used three.js and the physics engine is cannon.js. The multiplayer part uses websocket, but it's not synchronising the time at the moment so it's possible to a bit laggy. It's tested on mobile and desktop chrome. I hope you like it. Play here: http://butchersworkshop.com/crokinole/ Thank you!
×
×
  • Create New...