Skip to content

Commit 093557a

Browse files
committed
Removed worldConstraint changes
1 parent 03e67e2 commit 093557a

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/physics/matter-js/Factory.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ var MatterSprite = require('./MatterSprite');
1515
var MatterTileBody = require('./MatterTileBody');
1616
var PointerConstraint = require('./PointerConstraint');
1717
var Vertices = require('./lib/geometry/Vertices');
18-
var Vector = require('./lib/geometry/Vector');
1918

2019
/**
2120
* @classdesc
@@ -518,21 +517,18 @@ var Factory = new Class({
518517
* @method Phaser.Physics.Matter.Factory#worldConstraint
519518
* @since 3.0.0
520519
*
521-
* @param {number} x - The x position in the world to create the constraint at.
522-
* @param {number} y - The y position in the world to create the constraint at.
523520
* @param {MatterJS.Body} body - The Matter `Body` that this constraint is attached to.
524521
* @param {number} [length] - A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.
525522
* @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.
526523
* @param {object} [options={}] - [description]
527524
*
528525
* @return {MatterJS.Constraint} A Matter JS Constraint.
529526
*/
530-
worldConstraint: function (x, y, body, length, stiffness, options)
527+
worldConstraint: function (body, length, stiffness, options)
531528
{
532529
if (stiffness === undefined) { stiffness = 1; }
533530
if (options === undefined) { options = {}; }
534531

535-
options.pointA = Vector.create(x, y);
536532
options.bodyB = (body.type === 'body') ? body : body.body;
537533

538534
if (!isNaN(length))

0 commit comments

Comments
 (0)