Sunday, February 15, 2026
spot_img

(3.8.8) (web-mobile) Does Cocos Creator assist scale match 3D contents for each width and peak? – Cocos Creator


For instance, I wish to create a recreation with 3D contents run on browsers, and I would like the content material to scale match for each the width and peak, however once I creates a 3D helloworld pattern undertaking and in addition tick each ‘match width’ and ‘match peak’, the sport display appears simply scale match the peak solely, however not the width, is it the restriction of the sport engine or I must set one thing to let the 3D content material match each width and peak?

To clarify clearer, what I attempt to do at the moment: create a helloworld 3D undertaking, then tick each ‘match width’ and ‘match peak’:

Then construct the sport with ‘web-moble’ and run on browsers, once I regulate the peak of the window in order that the window is shorter than the designed peak, the 3D content material scales down usually:

however when I attempt to regulate the width, the 3D content material didn’t change the size, however appears regulate the seen space solely:

I would like the 3D content material to scale match the present window measurement routinely as a substitute of fixing the scale of seen space, each for the width and peak (ie:when both window peak is smaller than designed peak or window width is smaller than designed width, the content material can be scaled down at each instances), is there any methods to attain this impact with Cocos Creator?

Notice: I would like each width and peak of the 3D content material to scale match routinely in keeping with the window measurement, at first I exploit model 2.4.5 and located it scale suits on peak solely, therefore I strive model 3.8.8 and the impact nonetheless exists, which I don’t know if it’s a bug or design characteristic…

This conduct comes from the digicam part. It’s going to at all times lock one dimension.

fovAxis : CameraFOVAxis

The axis on which the FOV can be mounted no matter display facet modifications.

Outlined in cocos/misc/camera-component.ts:330

Additionally verify this line cocos/misc/camera-component.ts:339



1 Like

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles