Node Children Implemented
This commit is contained in:
1 parent
543dd3da3b
commit
d7bdf28055
3 files changed
+366
-5
No files matched your search
@@ -170,12 +170,21 @@ function newFloatingObject () {
|
||||
}
|
||||
|
||||
function tensionPhysics () {
|
||||
/* Tension Inheritance */
|
||||
if (thisObject.tensedManually === false) {
|
||||
let parent = thisObject.payload.chainParent
|
||||
if (parent !== undefined) {
|
||||
thisObject.isTensed = parent.payload.floatingObject.isTensed
|
||||
}
|
||||
}
|
||||
|
||||
/* Tension Effect */
|
||||
if (thisObject.isTensed === true) {
|
||||
let parent = thisObject.payload.chainParent
|
||||
if (parent !== undefined) {
|
||||
let distanceToChainParent = Math.sqrt(Math.pow(parent.payload.position.x - thisObject.container.frame.position.x, 2) + Math.pow(parent.payload.position.y - thisObject.container.frame.position.y, 2)) // ... we calculate the distance ...
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function thisObjectPhysics () {
|
||||
|
||||
Reference in new issue
Block a user