New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于计算消失finalY点的疑惑. #52
Comments
childWith + changedView.getLeft()就是changedView.getRight |
@xmuSistone 然后我的位移出屏也是测试有效: |
allWidth的处理,我不大清楚。如果没错的话,你就继续用吧。 |
|
childWith + changedView.getLeft() --> 不是很清楚具体的含义.
//这里是向左消失的计算.
finalY = yvel * (childWith + changedView.getLeft()) / (-xvel) + changedView.getTop()
我这里换成了这样.
因为 X,Y 消失消耗时间一致.
yvel / xvel = dy / dx
finalY = changedView.getTop() + dx * yvel / xvel;
也就是.
finalY = yvel * changedView.getRight() / (-xvel) + changedView.getTop();
测试后发现这种算法也能完美运行.但是finalY是不一样的..这就疑惑了..到底哪个才比较合适?
The text was updated successfully, but these errors were encountered: