iTween的一个潜在BUG

来源:互联网 发布:中超数据统计 编辑:程序博客网 时间:2024/06/05 10:17

2.0.5版本

GenerateMoveToPathTargets

if(tweenArguments.Contains("speed"))
{        float distance = PathLength(vector3s);time = distance/(float)tweenArguments["speed"];
}
vector3s 是已经补齐前后控制点的,但是PathLength中又会再补一次。造成BUG


google code上已经有人提出这个问题
Issue 75:GenerateMoveToPathTargets + "speed" argument issue

答复是:

Actually it looks like suppliedPath will not do as it does not account for plotStart set to true, so you could either create a new array to hold that as well or pass offset and length arguments to PathLength to skip the start/end nodes

正确的改法应该是把vector3s去除头尾再传递给PathLength



0 0
原创粉丝点击