Skip to content

understanding the multi resolution support in axmol #636

Answered by DelinWorks
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, what do you exactly want to achieve? it's really not clear what you want.
If you want to treat some objects as world objects and some as UI objects that follow the camera then you can do so by making a node follow the scenes camera and attach objects to it.

But first you want to set the design resolution to something like 720p so that the scene scale nicely on different screens, but then UI objects would look distorted! no worries you can use this function that makes it so that a node doesn't chase the design resolutions size:

inline void setNodeIgnoreDesignScale(cocos2d::Node* node) {
    Size actualFrameSize = Director::getInstance()->getOpenGLView()->getFrameSize();
    Size actual…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@realgearinc
Comment options

Answer selected by halx99
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants