Why does scale and setting geometry looks different?

For box geometries look like constructor !== scale. If I change the scale to x = 1, when my object is BoxBufferGeometry(1,1,1); it shows REEEEALY different views of my objects. Is it normal? It’s just really crush my game, when after setting =-1 size my object getting only bigger.

Here is some screenshoots. So first number in console is size of x,y,z for player cube, and when i use
cubeSize.xyz = cubeSize.xyz - 1;
cube.scale.set(cubeSize.xyz, cubeSize.xyz, cubeSize.xyz)
it look like he stayed at the same size after getting smaller, but make it down with Y position and when i use after
cubeSize.xyz = cubeSize.xyz + 1;
cube.scale.set(cubeSize.xyz, cubeSize.xyz, cubeSize.xyz);
it makes it being much more, than it was seted by box geometry, however, you can’t see that variable becomes just 2 again. I can’t tell you why it is, but for me, seems scale have different sizes, than constructor. Maybe scale is using meters and geometry foots, I don’t know. (i already read that scale use float by documentation, it was float before, i made it float again, it change nothing, still after 0.2+0.1 = 0.333344 and objec getting SAMALLER

image
image
image

When you want to scale down a mesh, it’s wrong to use a negative scale value (which effectively reflects the geometry). Instead, use a value between 0 and 1.

I even have use a if (cubeSize.xyz > 0.1) { to this deal, it’s nothing about negative as you can see in my chrome console

Look how it is when I try to do it bigger at float numbers. I don’t move it, just scale it to +0.1 2 time (websoket’s problem, still 0.4 < than 0.2, that’s really wierd)
image
image

Um, to be honest your problem is not clear to me, sry. Any chances to demonstrate the issue with a simple live example?

T and Y to resize, sorry for websockets
https://jsfiddle.net/hyen3fqb/

Sometimes forums don’t reply to you after i press it, so i’m sorry

sorry for DDoS also, but press f12 to see the numbers, they are really great.

The scenario of adding 0.1 to size (which is also a float) are really specific image
And the sizes after first operation really seems to use not same metrics as it was from setting geometry.

And yeah, I know that JS have some magic with floats, but still rounding does not change the fact of become smaller, after trying to make it bigger.(i really tried it)

The difference between 5.0 of geometry settings and scale settings be like
image

I’m sorry but I really don’t understand the difference between the actual and your expected result. Can you please reproduce the problem with a smaller test case (not your app)?

the cube with oppacity and moving cube on last picture have the same size by three js, but have different size in real vision. when i use
cubeGeometry = new THREE.BoxBufferGeometry( cubeSize.xyz, cubeSize.xyz, cubeSize.xyz);
it becomes different frome
cube.scale.set(cubeSize.xyz,cubeSize.xyz,cubeSize.xyz)

i want to set scale with the same metric, that uses BoxBufferGeometry, to make a game logic understandable and possible. After FIRST time you will use scale it will make your work use another metric, like BoxBuffer is meters, and now it’s foots, so everything become smaller.That how i see the three js problem in my project

I’m afraid I’m unable to reproduce: https://jsfiddle.net/cL7pzrbu/

if you do
let mesh2 = new THREE.Mesh( new THREE.BoxBufferGeometry(4,4,4), material );
mesh2.position.x = - 5;
mesh2.scale.set(4,4,4);
scene.add( mesh2 );
you will have my problem. So i just don’t understand a logic of work of it, and how i can change smth, that seted by geometry. If you can give me some knowlege, i won’t regret it. Sry if i looked rude.

And if you can help me in one more thing, what is the math logic of position of the lowest ribs of box, while it change the scale, maybe some formula. I know its almost same at 3dmax and etc, but still, want to now, how i need to transtaleY for make my box stay on ground after scaling.

What’s the problem in your last example. When I do what you describe I’ll just have a mesh, not a problem.

Three.js is unit agnostic, the units have a meaning only if you give them one.

The problem in all this post is:
THREE.BoxBufferGeometry(4,4,4), material );
mesh2.scale.set(4,4,4);
!=
(
THREE.BoxBufferGeometry()
mesh2.scale.set(4,4,4);
||
THREE.BoxBufferGeometry(4,4,4), material );
)
It looks like change metric(like from meters to inches for 1m=1inch), like it render and work logically after first time, but it makes you object to be made change size like 3x less.

Look this photoimage
5 is scale of moving cube at box-ground and another 5 is scale of opacity one. Do they look ===?

No but they shouldn’t three different cubes with three different transformations. There are no meters and inches involved.

How do i scale if i selected geometry normally ?

I don’t say it is, i just shared my exp of how i see it, i think the one that used 3dmax would understand.

I used 3ds max for 20 years but I’m afraid I don’t understand at all what you need :frowning: