Search the Community

Showing results for tags 'spring'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • 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 5 results

  1. Hello, i created a litle game, based on the car demo in the playground, Now i have noticed that when i click with the mouse (left, middle, right) the car bounce a litle for and then back. also when the key is released. I have created an video: https://sendvid.com/f3xjn5vd Have a look on the console. I dont think this is not an problem with my game logic, more with the canvas. Like you drag & drop the frame. Has anyone an similar problem or a fix for me ? I dont know what to do.
  2. Hello, I would like to know if it is possible to visually debug constraints when using P2JS (springs, revoluteconstraints, distanceconstraints, etc.) I found this image of box2d debug to illustrate what I mean Thanks in advance for any advice!
  3. Hi, I'm trying to keep the sphere in this simulation http://playground.babylonjs.com/#1VPUIR attached to the end of the spring. Right now, the sphere will appear attached for the way the settings are currently set, however if I change the scaling of the spring to make it appear to stretch further I have to recalculate the position of the sphere. Is there any way to keep the shpere at the end of the spring regardless of the scaling?
  4. while i can do the following for constraints: var allConstraints = game.physics.p2.getConstraints(); if (allConstraints.length > 0){ for (i=0; i<=allConstraints.length; i++){ game.physics.p2.removeConstraint(allConstraints[i]);} }it seems that springs work different although the documentation says it works exactly the same way: var allSprings = game.physics.p2.getSprings(); if (allSprings.length > 0){ game.physics.p2.removeSpring(allSprings); }removeSpring does not take A spring .. it takes a spring array... so how would i remove a single spring then?
  5. first i create a mousebody... mouseBody = game.add.sprite(0, 0, '', 0);game.physics.p2.enable(mouseBody,true);mouseBody.body.setCircle(2);mouseBody.body.data.shapes[0].sensor = true;this one is kept at the mouse position via the update loop with this lines: mouseBody.body.x = game.camera.x+game.input.x;mouseBody.body.y = game.camera.y+game.input.y;then i check if i hit a "tux" with a mouseclick and if so i create a connection between the mousebody and my tux body.. game.physics.p2.createSpring(hitobjectbody, mouseBody, 1,20,1);this works great but sometimes the spring created doesn't follow the configuration it is definitely not 1,20,1 it is more like 30,40,1 i just can't find out why this is happening but it's driving me nuts.. i clear all springs with this lines: var allSprings = game.physics.p2.getSprings(); if (allSprings.length > 0){ game.physics.p2.removeSpring(allSprings); }there is something wrong with remoeSpring because it only takes an array.. no single spring (i already posted about that) thx! (in the attachment you can see that the mousebody keeps it's distance to the tux.. it is exactly below the mouse pointer but the tux can never be there even if the "restLength" of the spring should be 1px as configured.. )