All these tutorials involve like 2 or 3 things at once and out of the 7 I've sat down and watched i still can't figure out how to make a 3d object clickable. Since all tutorials want to show me raycasting and mouse hover stuff in addition to mouse clicks and i can't tell how to separate them and so the code never works because it is tied up with references to the other stuff in these scenes that i don't have in mine. I literally have ONE LONELY SPHERE in three.js with the perspective camera and the sphere is rotating. I just want to click on it and make it slow down. I know how to make it slow down, but how do I make the sphere clickable? Like, it's soooo simple, it shouldn't be this hard.
I'm no expert in three.js, so take my advice with a grain of salt. If you want to make the sphere to slow down when you click it, then you have to use raycasting to conditionally check if you click the sphere or not. Otherwise you could just add an eventlistener that listened for button clicks.
I am passing: _scene.add(_board) and this board has 30 .obj, so the userData.squares doesn't exist. board.userData.squareNumber = squareNumber++; intersects[0].object.userData. squareNumber Objets exist but the userData squareNumber doesn't.
Thank you bro! I was trying to implement a Drag & Drop scene in Angular, so Typescript came good to me. It's worked perfectly.
Thank you a lot for that great video !
Thanks for the tutorial
@Genka How do we move object not in a plane but anywhere in the space?
thanks man this is amazing
Great video! Thanks you bro. Do you know how to change colors of a custom 3d object ? Please do a video on that
Good tutorial! Thanks! ^^
I don't know typescript so I'm trying to do this in JavaScript and it's not working.
Жиза
thank you so much
awesome thank you so much
Thanks for the great video! I have trouble figure out how to use this Raycaster in react three fiber? could you please share some light? thank you
All these tutorials involve like 2 or 3 things at once and out of the 7 I've sat down and watched i still can't figure out how to make a 3d object clickable.
Since all tutorials want to show me raycasting and mouse hover stuff in addition to mouse clicks and i can't tell how to separate them and so the code never works because it is tied up with references to the other stuff in these scenes that i don't have in mine.
I literally have ONE LONELY SPHERE in three.js with the perspective camera and the sphere is rotating. I just want to click on it and make it slow down. I know how to make it slow down, but how do I make the sphere clickable?
Like, it's soooo simple, it shouldn't be this hard.
I'm no expert in three.js, so take my advice with a grain of salt.
If you want to make the sphere to slow down when you click it, then you have to use raycasting to conditionally check if you click the sphere or not.
Otherwise you could just add an eventlistener that listened for button clicks.
I want do it in cellphone with touchstar, touchend etc... can help bro?
Hello)
How to change code for moving Object3D? Not mesh)
Thx!)
thanks a lot man
I am passing: _scene.add(_board) and this board has 30 .obj, so the userData.squares doesn't exist.
board.userData.squareNumber = squareNumber++;
intersects[0].object.userData.
squareNumber
Objets exist but the userData squareNumber doesn't.
line 142 var draggable : THREE.Object3D; makes no sense, failed to compile is what I get
Make sure you file is a .ts file instead of .js
@@Meltdown_Gaming how i can type it in .js? couse, i dont know why but if i change it to .ts, i had so much error
@@Meltdown_Gaming st
Stop doing all in TS or give an extra alternative JS file also.
@@joep1131 I prefer Javascript as well, which is why I manually converted the code to js. You simply can't change the file extension...
Kiss strategy
Please help me 🥺🥺🥺
Please help
Please