如何在box2d世界中正确实现水平和垂直滚动?
我已经实现了水平滚动,但垂直滚动却带来了麻烦,而且这个麻烦很难解释。所以我可以垂直和水平滚动场景
,如果这是从场景的原点(即ccp(0,0))完成的。但是,当向 X 滚动完成并在中间暂停时,如果我垂直滚动它,它实际上会沿对角线滚动,返回到原点(x),以及 y 的新位置。
我知道这很难理解,但是如何实现从向下滚动的位置垂直滚动它。
I have implemented horizontal scroll, but vertical scroll making trouble, and the trouble is difficult to explain. So I can scroll scene
vertically, and horizontally, if that is been done from the scene's origin, i.e ccp(0,0). But when Scrolling towards X have been done, and been paused in the middle, then if i scroll it vertically, it actually scroll diagonally, back to origin(x), and new position of y.
I know it's complicated to understand, but how can it be achieved to scroll it vertically from the position it have been scrolled down.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果有人有我的问题,那么这里是他的答案,
IF SOMEONE HAVE GOT MY QUESTION THEN HERE IS THE ANSWR FOR HIM,