该游戏由支持cocos2d 0.99.5 和Box2d 创建。 苹果手机 SDK 4.3
我们有一个角色。当一个角色快速移动时,它看起来很模糊(模糊//没有聚焦)。在模拟器和设备 (iPhone 3G) 上。
使用 mouseJoint 移动角色(dampingRatio = 0//frequencyHz = -1)。
在屏幕截图中清晰可见。 link
角色被聚焦。截图不是传输问题。
始终为 60 fps。
尝试过的参数:
使用 kCCDirectorProjection2D//3D
alies//对抗纹理参数
CC_COCOSNODE_RENDER_SUBPIXEL 1 和 0
视频示例:link
如何在移动过程中获得清晰的角色图像?
最佳答案
我也遇到过这样的问题,通过更改 ccConfig.h 中的这一行来修复它:
<code>#define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 0</code>
到
<code>#define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 1</code>
这是对这个定义的评论,也许它对某人有帮助。
<pre><code> /** @def CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL
If enabled, the texture coordinates will be calculated by using this formula:
- texCoord.left = (rect.origin.x*2+1) / (texture.wide*2);
- texCoord.right = texCoord.left + (rect.size.width*2-2)/(texture.wide*2);
The same for bottom and top.
This formula prevents artifacts by using 99% of the texture.
The "correct" way to prevent artifacts is by using the spritesheet-artifact-fixer.py or a similar tool.
Affected nodes:
- CCSprite / CCSpriteBatchNode and subclasses: CCLabelBMFont, CCTMXTiledMap
- CCLabelAtlas
- CCQuadParticleSystem
- CCTileMap
To enabled set it to 1. Disabled by default.
@since v0.99.5
*/
</code></pre>
关于iphone - Cocos2d。漫反射图像 (60 fps),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6986433/