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
Camera fails to show sprites outside visible size #10487
Comments
I've experienced this issue too in cocos2d-x 3.4. It seems as if culling is not taking into account the camera movement, but only the original screen bounds. (Looking at Renderer::checkVisibility() seems to confirm this. I can't see the camera being used in the visibility calculations). For the time being, I'm setting #define CC_USE_CULLING 0 as a workaround. (Which by the way, creates a compilation error in Label::draw() since the code references a local variable only defined within the #if CC_USE_CULLING ... #endif block). |
confirm issue exists in 3.6... |
I have added a test case to reproduce this bug. Renderer->Auto-culling is affected by transform and view matrix. Now the implementation ignore the view matrix dirty so lead to this bug. The But |
This happens also when drawing a FastTMXTiledMap and its TMXLayer objects. This seems to partially solve the camera cull for TMX Layers:
|
From the forum:
http://discuss.cocos2d-x.org/t/camera-bug-when-moving/19904/2
Using 3.4 final, I create a bunch of sprites, then position them one by one to the right. I move the camera to the right, and everything off the screen is hidden. However, if I move the layer to the left, I can see the sprites.
Code from forum post:
The init of HelloWorld:
Then I create the sprites and add them to the layer, each one positioned to the right of the previous sprite.
In the onEnter:
Related?
#10275
The text was updated successfully, but these errors were encountered: