阅读背景:

无法正确设置精灵的速度

来源:互联网 

I am making an asteriods-like app in iOS8. I have code that creates a laser shot and sets its velocity vector according to the facing of the ship. When the ship is oriented upwards on the screen, the code works correctly. When the ship is oriented downwards on the screen the sprite has no, or almost no, velocity along the y-axis. That is, the .dy component of physicsBody.velocity behaves as if it is near zero; the .dx component behaves correctly. LLDB reports the .dy component as what it should be, but the sprite moves incorrectly. Here is the relevant code:I am making an asteriods-like app in iOS8. I ha




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: