浏览代码

added followCursor rate

prevent following too quick
eLandon 4 年之前
父节点
当前提交
5da7173803
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      SequenceMgr.js

+ 6 - 2
SequenceMgr.js

@@ -51,7 +51,8 @@ var viewZoom = script.addFloatParameter("View Zoom", "", 0.5, 0., 1.); //part of
 var viewFollowCursor = script.addBoolParameter("follow Cursor", "", false);
 var followCursor = false ;
 var followZoom = 0.5 ;
-
+var followRatems = 1.;
+var followDelta = 0.;
 // var sequence_structure = {	params: {}, 
 // 							groups:{},
 // 							keys:{
@@ -151,7 +152,10 @@ function update(deltaTime){
 			exportSequenceFile(saveFile);
 			script.log("sequence autosave");
 		}
-		if(followCursor){
+
+		followDelta += deltaTime ;
+		if(followCursor && (followDelta>followRatems)){
+			followDelta = 0. ;
 			seq_followCursor() ;
 		}
 	}