GLTF Model not detecting with raycast

Hi I added gltf model but after when I click on the model then it didn’t work. Your help would be appreciated

Is there any way to detect the gltf loader with raycast ?.Is there any person who can help me ?

Any chance to put mode detailed description of the problem, providing an editalbe live code example (jsfiddle, codepen, codesandbox etc.)?

let me do…

Hi, you can share the model?

Thanks for the reply.All things are working but the thing is when I click on model then it shows me specific model mesh instead of all model mesh and one more thing is to show me griphelper as well.I dont know why it’s happening.

Only you know what and how works in your code. Without a live code example, all we can do is fortune-telling. Please, put more effort in asking the question, providing an example, that demonstrates the issue(s).

1 Like

Ok i will share with you in a while

var scope;
class RaycastOnModel {

    this.ModelLoad_Scope = new ModelLoad();


    scope.Raycaster = new Raycaster();

    scope.pointer = new THREE.Vector2();










    scope.pointer.x = ( event.clientX / window.innerWidth ) * 2 - 1;

    scope.pointer.y = - ( event.clientY / window.innerHeight ) * 2 + 1;  





    let intersects = scope.Raycaster.intersectObjects(scope.ModelLoad_Scope.scene.children,true);

    if(intersects.length )




export {RaycastOnModel} ;

scripts are too many so I cant share on live demo .So I send you the code there of ray casting

as you can see when i click on model then it will show many children’s including grid. I want to just click the model which i get the whole object and apply properties accordingly