{"behavior_tree":{"parameters":[{"type":"Float","name":"targetDistance","value":[60.0,0.0,0.0,0.0]},{"type":"Float","name":"distancePerSecond","value":[60.0,0.0,0.0,0.0]},{"type":"Float","name":"nodeI","value":[0.0,0.0,0.0,0.0]},{"type":"Float","name":"currentDistance","value":[0.0,0.0,0.0,0.0]},{"type":"Float","name":"startAngle","value":[0.0,0.0,0.0,0.0]},{"type":"Float","name":"endAngle","value":[0.0,0.0,0.0,0.0]}],"rootNode":{"name":"Start","position":[0.0,0.0],"type":"Decorator","childTreePath":"","children":[{"name":"Repeat until done","position":[0.0,0.0],"type":"Decorator","childTreePath":"","children":[{"name":"Extend Segment","position":[0.0,0.0],"type":"Leaf","childTreePath":"","onStart":"","onUpdate":"currentDistance += dt * distancePerSecond\ncurrentDistance = min(currentDistance, targetDistance)\nStem.setNodeDistance(nodeI, currentDistance)\nprogress = currentDistance / targetDistance\nprogress = 0.5 - 0.5 * cos(progress * 3.14159265)\ncurrentAngle = startAngle + (endAngle - startAngle) * progress\nStem.setNodeAngle(nodeI, currentAngle)","onDone":""}],"onStart":"","onUpdate":"","onDone":"if (result == Success && currentDistance < targetDistance) {\n    result = Running\n}"}],"onStart":"","onUpdate":"","onDone":""}}}