This commit is contained in:
1 parent
4206b65160
commit
b082a32902
1 file changed
+3
@@ -207,6 +207,7 @@ function newFloatingObject () {
|
||||
|
||||
function tensionPhysics () {
|
||||
/* Tension Effect */
|
||||
|
||||
if (thisObject.isTensed === true) {
|
||||
let parent = thisObject.payload.chainParent
|
||||
if (parent === undefined) { return }
|
||||
@@ -244,6 +245,8 @@ function newFloatingObject () {
|
||||
thisObject.payload.angle = thisObject.payload.angle - 360
|
||||
}
|
||||
|
||||
if (distanceToChainParent > 1000) { return } // this is introduced to avoid edges cases when importing workspaces.
|
||||
|
||||
newPosition = {
|
||||
x: parent.payload.position.x + distanceToChainParent * Math.cos(toRadians(thisObject.payload.angle)),
|
||||
y: parent.payload.position.y + distanceToChainParent * Math.sin(toRadians(thisObject.payload.angle))
|
||||
|
||||
Reference in new issue
Block a user