Whats up. I’m engaged on a 2D sport in cocos v2.3.4. I’ve simply added a characteristic with a most important digicam to render my sport parts and a secondary digicam to render my UI in order that the principle digicam might be zoomed with out the UI transferring. The issue is that now the ultimate image will get greater within the sport as an alternative of staying throughout the outlined dimension of the masks.
The heirarchy appears like this:
Canvas (masks)
Principal Digicam
UI Digicam
Recreation StuffEvery little thing else
I’m zooming the digicam by rising the zoomRatio to 1.8.
I’ve learn the related documentation and it looks as if this ought to be working so I might use some assist. Thanks
Can you present screenshots or mock-ups of what you count on to see, and what you’re really seeing? A easy check mission that reproduces what you’re seeing would additionally assist.
I can’t present a screenshot since my firm doesn’t permit it however I can attempt to create a bit mock up. Principally we’re creating cell video games so there ought to be a masks that’s the dimension of the display screen. This all labored nice till I began messing with the digicam. Now when it zooms, the background and sport parts simply get greater and go exterior the bounds of the “display screen dimension”. The masks that will usually lower it off appears to be zooming as nicely or simply being ignored.
A mock-up could be completely fantastic. In the event you can create a easy check mission too, with the minimal quantity of code required to show the issue, then that will be useful.
Additionally, the model of Cocos2d-x you might be utilizing is extraordinarily outdated, and this particular situation you might be experiencing could have been mounted in later variations. Can you try it out with Cocos2d-x v3.17.2+ or v4? Even writing a easy check case for your self to see if it has been mounted, and when you discover that it has, you then could possibly port the repair again to the model of Cocos2d-x you might be utilizing to your mission.
I’m unable to improve the model. I’m conscious its historic however its what my firm makes use of with their present pipeline so its not an choice.
Sorry, I didn’t imply improve your mission to a more moderen model of Cocos2d-x. What I meant is write the minimal quantity of code to breed the problem in a check mission utilizing Cocos2d-x v2.3.4, after which check that very same code utilizing a more moderen Cocos2d-x simply to see if the problem has been mounted. That’s assuming it is a drawback with Cocos2d-x, so it’s solely useful if it seems this is a matter with the engine code.
In the interim, posting a small check mission that reproduces the problem could be the easiest way that can assist you with this, in any other case it’s only a guessing sport for everybody concerned. In the event you’re not in a position to create a small mission with this situation, then hopefully another person searching this discussion board could have come throughout this earlier than and might present an answer.