Good afternoon.
There are 2 blocks
I need to make the height of 2 block equal to the height of 1 block
How can I do that?
Good afternoon.
There are 2 blocks
I need to make the height of 2 block equal to the height of 1 block
How can I do that?
Hi!
If scaling on y-axis is okay, then
mesh2.scale.y = mesh1.height / mesh2.height;
mesh1.height
height ? mesh1.geometry.boundingBox ??
Yes, but it’s up to you, how you get objects’ heights.
Y can get 2 coords of vertices by index
const v1= new THREE.Vector3().fromBufferAttribute(mesh.geometry.attributes.position, 0);
v1.applyMatrix4(mesh.matrixWorld);
and then use v1.distanceTo (v2)