Get camera size

Get camera size
0

Hello everyone!

I want to Instantiate objects at the borders of the Main Camera.
I read the Camera documentation but I can’t find a property or method which could give me the size of the camera or the borders of the camera.
Is there a way to get these information?

Thanks in advance!

For cocos creator, use Widget to align/position nodes.
https://docs.cocos2d-x.org/creator/manual/en/components/widget.html

For cocos x, use getWinSize
https://cocos2d-x.org/reference/html5-js/V3.7/symbols/cc.Director.html#getWinSize

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.