Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
Three.js - Is there any way to use a selection box with the Raycaster?

I have a GLTF scene where I've experimented with the example selection box (code) to select multiple meshes.

However, the results are inaccurate because it picks based on the centroid of each mesh and also gets meshes that are not visible by the camera (viewing one side of a house model selects all the walls in the direction of the box).

I've also experimented using the Raycaster, and it works great for picking with the mouse/pointer.

Is there any way to use a selection box or two Vector3 (starting and ending point of the box) with the Raycaster?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use a Raycaster to create a Frustum.

  1. Create two Plane objects to represent your camera's near anf far planes.
  2. Use the Raycaster to intersect your selection area's start/end points against the Plane objects.
  3. Use the intersection points to define the Frustum.
  4. Use Frustum.containsPoint and Frustum.intersectsObject to see if a particular object is within your selection area.
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda