All Questions
135
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
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
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.
...
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 ...
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 ...
2
votes
1
answer
64
views
Placing an object on the surface of a rotated Sphere
this is my first post so I will try my best to explain. Every time I place an object on a rotating spheres surface, it gets offset the more the sphere rotates.
I tried offsetting it back to the mouse, ...
0
votes
0
answers
44
views
A-FRAME how to update raycaster intersections?
I'm trying to identify the various parts of a model by clicking on them.
For now I'm able to identify them but every time that I change part I must lose focus by mouse over away from the model and ...
0
votes
0
answers
81
views
Change the color of a face of a sphere geometry on hover
Hello everyone I am a beginner in Three js what I would like to do is that when we fly over the sphere a cube is added in my scene and when the sphere is in contact with the cube, that all the faces ...
0
votes
0
answers
60
views
ThreeJS raycast to detect animation model?
I want to detect when the user in my ThreeJS is looking at one of the animation models. Currently I am using this code:
ourRaycaster.setFromCamera(g_Mouse, g_ThreeJsCamera);
...
0
votes
0
answers
183
views
Why is checking raycast intersections so slow in Three.js?
I'm making an FPS game using Three.js.
Take a look at this code:
let raycaster = new THREE.Raycaster();
raycastTargets = [otherPlayer];
center = new THREE.Vector2(0,0);
function animate() {
...
1
vote
1
answer
170
views
Raycasting not working on imported OBJ model,but working on object created with the program
I am new to three.js, and i am trying to use raycasting, i am quite confused with how raycasting would work on imported 3d models. Here i imported an obj model, and when i try to detect whether i ...
1
vote
1
answer
39
views
Problem on if else statement when working with raycasting
I am trying to use raycasting to detect whether my mouse pointed at the object, when it didnt touch the function is working fine, but when it touch, it did stop printing out "didnt touch", ...
0
votes
1
answer
94
views
Moving mesh up but the ray caster detects it like its mirrored on the Y-axis
It looks like the raycaster is detecting all my objects but flipped. When I add a cube and I don't change the position it works fine but when I move the cube up the ray-casting goes down. Does anyone ...