Reposition instancedMesh's anchor/axis at bottom of object #1530
-
I've got an instancedMesh array of different sized vertical bars. Currently the axis or anchor of the Mesh is positioned in the center of the object and when they are arranged along the X-axis I get something like this... Any idea how I could arrange the instancedMesh to have them all level like this.... To get the different sized bars I have been adjusting the scaleY value... `function arrayLayout(data) {
}` Here is where I set the matrices...
and finally this is what I return...
I'm still super new to this, so maybe I'm going about this the wrong way too, so any advice would be welcome. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
in three objects are always centred. so cut it in half and move it up one half. the instancedmesh looks a little bit too complex imo, here's one that you could adapt: https://codesandbox.io/s/audio-analyser-dvokj?file=/src/App.js:4269-4832 (the graph component plays in the background behind the statue) |
Beta Was this translation helpful? Give feedback.
in three objects are always centred. so cut it in half and move it up one half. the instancedmesh looks a little bit too complex imo, here's one that you could adapt: https://codesandbox.io/s/audio-analyser-dvokj?file=/src/App.js:4269-4832 (the graph component plays in the background behind the statue)