For instance, I wish to create a sport with 3D contents run on browsers, and I need the content material to scale match for each the width and top, however once I creates a 3D helloworld pattern mission and in addition tick each ‘match width’ and ‘match top’, 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 top?
To elucidate clearer, what I attempt to do at the moment: create a helloworld 3D mission, then tick each ‘match width’ and ‘match top’:
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 top, 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 need 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 top (ie:when both window top is smaller than designed top 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?
Observe: I need each width and top of the 3D content material to scale match routinely in line with the window measurement, at first I take advantage of model 2.4.5 and located it scale matches on top 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 function…
This conduct comes from the digital camera part. It can all the time lock one dimension.
fovAxis : CameraFOVAxis
The axis on which the FOV can be fastened no matter display facet adjustments.
Outlined in cocos/misc/camera-component.ts:330
Additionally test this line cocos/misc/camera-component.ts:339
1 Like


