Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
group selection react three fiber

I am trying "merge"/"group" select multiple meshes.

At the moment I have something like this.

//wrapper


        <group
            onPointerOver={(e) => getOverEvent(e)}
            onPointerOut={(e) => getOutEvent(e)}
            onPointerMissed={(e) => clickOutside(e)}
            onClick={(e) => clickEvent(e)}
            dispose={null}
            ref={group}
            >
            {children}
        </group>

and children as follows


            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe.geometry}
                material={materials.laces}
                name="1"

            />
            
            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe_1.geometry}
                material={materials.mesh}
                name="2"
            >
            </mesh>
            
            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe_2.geometry}
                material={materials.caps}
                name="3"
            />

This result of course is desired, as it hovers the hovered mesh.

however i would also like to be able to group hover certain meshes I have seen something somewhat related to what i want to do. https://github.com/pmndrs/drei#select

Basically i want to group mesh 1 and 3 for example, so if either for those meshes are selected/hovered they are detected that they are of the same group and hover/highlight both of them.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Using the group ref you can identify all the children using


let my_group = group.current.getObjectByName("my_group")

console.log(my_group.children)


<group name="my_group">

            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe.geometry}
                material={materials.laces}
                name="1"

            />
            
            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe_1.geometry}
                material={materials.mesh}
                name="2"
            >
            </mesh>

</group>


about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!