access an array of 3D objects on the scene (react three)

I have a map file where the location of all objects on the stage is indicated, I load it and add objects to the stage with the following method in the GameMap class:

...
mesh() {
    return this.mapData.staticBlocks.map(e => {
      return <Block position={e}/>
    })
  }
...

I want to check the position of objects (including moving ones) in the player component when moving the player in order to simulate the player’s physics

the cleaner choice is almost always one way data flow, from top to bottom. reaching upwards or backwards to fetch other objects is two way data flow and it’s always going to blow or cause a mess. the key is state management. the data is in your state model and the objects merely listen and react to it. since everything gets to access the state model you have the full picture at all times.

what do you use for physics btw?

Do not quite understand.

For physics, I use cannon