All Questions
Tagged with raycasting three.js
257
questions
-1
votes
1
answer
18
views
Threejs Raycaster intersections not updated immediately when adding to scene but when removing
I am trying to build a minecraft clone in threejs currently.
I have a very basic setup right now where I have added some cubes to a scene and a Raycaster, that checks if the Pointer is over any of the ...
0
votes
1
answer
34
views
Mapbox/Maplibre raycast with only a projection matrix and georeferenced objects
I guess this could be considered a continuation of this question so please check it out for context about his one, especially the JSFiddle reported in said question.
I'm basically trying to achieve ...
0
votes
0
answers
25
views
Raycasting and Hover Effect
Hello to everyone who's reading!
I'm building a website in THREE.js where you can scroll through "cards" that are seen isometrically, and I'm currently adding an animation when hovering over ...
0
votes
0
answers
43
views
I am facing an issue (no output) implementing raycaster in three js here is the code:
I created the sphere with a material using three.js, and I tried to make it clickable (via raycasting) but it does not work.
Camera, scene and lights and imported GLFT are there working properly but ...
0
votes
0
answers
78
views
react three fiber gsap transition menu
Im using R3F + GSAP for animating box position. Using Raycaster I set a white box object to indicate when a menu item (box) collides with it so the animation would start.
I would like to achieve the ...
0
votes
0
answers
58
views
Scaling & raycaster issues (breaking changes after updating to new Three.js & React Three Fiber versions)
The app worked fine with ("react-three-fiber": "^5.3.14) and (three": "^0.148.0) together with ("react": "^18.2.0").
Now, I'm using ("@react-three/...
0
votes
0
answers
65
views
How to reduce the gray-line artifacts in three.js isosurface rendering of 3D texture example?
the isosurface example in the three.js website shows gray-line artifacts over the surface, please see
https://threejs.org/examples/webgl2_materials_texture3d.html
the glsl shader source code is here
...
0
votes
0
answers
37
views
Problems with using Raycaster to detect an Object in Three.js
I am a software engineering student and i am developing a simple game. I want to add a feature where when i click on a door a floating tip pops up with the name of the rooom that it gives access to.
...
0
votes
0
answers
22
views
Is it allowed in THREE.js to create a mesh with an array of materials containing less elements than the number of sides in the geometry?
In my case I ran into an issue when raycasting a cylinder which was defined using CylinderGeometry and an array of materials with length 2 (instead of 3).
I could not find anything in the ...
1
vote
0
answers
30
views
Reducing geometry based on Geometry indices in ThreeJS
Title might be a result of an XYZ problem, my original intent is to save and load multiple selected regions on a model surface. The selection logic follows the example in Three-Mesh-BVH, (Example here ...
1
vote
0
answers
71
views
How to color the clicked mesh in Threejs using Orbitcontrol?
I'm trying to color the clicked mesh in a mesh group in ThreeJs. In addition, I'm using orbitcontrol for 3D model. But when I tried to color the clicked mesh, a different mesh was colored.
Here some ...
0
votes
1
answer
100
views
Raycasting HTML elements with ThreeJS
we are facing one problem with ThreeJS. We are trying to include HTML elements within ThreeJS and we are raycasting to get if we are pointing to any HTML element. But when we intersect it, returns an ...
0
votes
0
answers
36
views
Raycaster select the nearest objects
what i want is ,when the cursor is near to the particles console the particles name. but now when i hover on a particle it console its name. i need it when the cursor is near to the particle
document....
0
votes
0
answers
19
views
Raycaster not working correctly with pointsGeometry
Raycaster not working correctly with pointsGeometry . when i click anywhere on the canvas it is not showing the intersect correctly .what i want is when i click a point , the console.log() should work....
2
votes
1
answer
76
views
Three.js raycasting doesn't work on a moving object
This is a three.js and typescript project. I am trying to color a sphere by raycasting to it, but it seems like the raycast doesn't know when the object has moved and assumes it still is at it's ...