three.js Raycaster - Tutorial for mouse picking / drag & drop

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ • 28

  • @Abdiel262
    @Abdiel262 3 роки тому +3

    Thank you bro! I was trying to implement a Drag & Drop scene in Angular, so Typescript came good to me. It's worked perfectly.

  • @joanisky4925
    @joanisky4925 2 роки тому

    Thank you a lot for that great video !

  • @sayidinaahmadalqososyi9770
    @sayidinaahmadalqososyi9770 Рік тому

    Thanks for the tutorial

  • @devchauhan468
    @devchauhan468 3 роки тому +1

    @Genka How do we move object not in a plane but anywhere in the space?

  • @rogerfuentes5979
    @rogerfuentes5979 Рік тому

    thanks man this is amazing

  • @narendrareddyyarramreddy2007
    @narendrareddyyarramreddy2007 3 роки тому +2

    Great video! Thanks you bro. Do you know how to change colors of a custom 3d object ? Please do a video on that

  • @3dfuture.ledcanvas
    @3dfuture.ledcanvas 3 роки тому

    Good tutorial! Thanks! ^^

  • @songwright
    @songwright 3 роки тому +2

    I don't know typescript so I'm trying to do this in JavaScript and it's not working.

  • @أيوب-الانصاري
    @أيوب-الانصاري 2 роки тому +1

    thank you so much

  • @josephjo4545
    @josephjo4545 2 роки тому

    awesome thank you so much

  • @fanweidong6256
    @fanweidong6256 2 роки тому

    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

  • @Rebel8MAC
    @Rebel8MAC 3 роки тому +1

    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.

    • @eirikb3463
      @eirikb3463 2 роки тому

      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.

  • @appsdecasa
    @appsdecasa Рік тому

    I want do it in cellphone with touchstar, touchend etc... can help bro?

  • @ВладМирошниченко-г3г

    Hello)
    How to change code for moving Object3D? Not mesh)
    Thx!)

  • @faitthegamingk8413
    @faitthegamingk8413 2 роки тому

    thanks a lot man

  • @appsdecasa
    @appsdecasa Рік тому

    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.

  • @ifecojahs8151
    @ifecojahs8151 3 роки тому

    line 142 var draggable : THREE.Object3D; makes no sense, failed to compile is what I get

    • @Meltdown_Gaming
      @Meltdown_Gaming 3 роки тому +2

      Make sure you file is a .ts file instead of .js

    • @mfz5166
      @mfz5166 3 роки тому

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

    • @joep1131
      @joep1131 3 роки тому

      ​@@Meltdown_Gaming st
      Stop doing all in TS or give an extra alternative JS file also.

    • @Meltdown_Gaming
      @Meltdown_Gaming 3 роки тому

      @@joep1131 I prefer Javascript as well, which is why I manually converted the code to js. You simply can't change the file extension...

  • @makarishnaik6869
    @makarishnaik6869 3 роки тому +1

    Kiss strategy

  • @hadjerhadjer9215
    @hadjerhadjer9215 3 роки тому

    Please help me 🥺🥺🥺

  • @hadjerhadjer9215
    @hadjerhadjer9215 3 роки тому

    Please help

  • @hadjerhadjer9215
    @hadjerhadjer9215 3 роки тому

    Please