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

153
Views
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 answers
Answer question

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 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!