Ziden Posted March 2, 2018 Share Posted March 2, 2018 I have some joints and some connected joints to those joints. What i want to achieve is, move the connected joints whenever a father is moved, but it seems the child joint is moving more then the father joint. This is my drag update function: onDragUpdate(e) { if(this.connectedJoints.length > 0) { const differenceX = e.position.x - e.previousPosition.x; const differenceY = e.position.y - e.previousPosition.y; this.connectedJoints.forEach(joint => { joint.sprite.x += differenceX; joint.sprite.y += differenceY; }); } It appears the connected joint moves more then the original joint. Any ideas why is this wrong ?? Best regards Link to comment Share on other sites More sharing options...
Recommended Posts