Skip to main content

All 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 ...
leonbubova's user avatar
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 ...
jamfury's user avatar
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 ...
Vikshit Ganjoo's user avatar
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. ...
Diogo's user avatar
  • 21
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 ...
sunShine's user avatar
  • 145
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 ...
kartGIS's user avatar
  • 689
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 ...
Dronius's user avatar
  • 47
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, ...
Rokborr's user avatar
  • 33
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 ...
Frank Leaster's user avatar
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 ...
melvin debot's user avatar
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); ...
Robert Oschler's user avatar
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() { ...
ProOfficial's user avatar
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 ...
Noone's user avatar
  • 61
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", ...
Noone's user avatar
  • 61
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 ...
Mike's user avatar
  • 83

15 30 50 per page
1
2 3 4 5
9