这是indexloc提供的服务,不要输入任何密码
Skip to content

Gltf object click listener #37

@YMZnew

Description

@YMZnew

I've followed documentation for adding click listener on gltf object , but event not triggered .
`loader = new GLTFLoader()

loader.load(url, gltf => {
  model = gltf.scene
  model.scale.set(scale, scale, scale)
  model.rotation.x = rotation
  model.position.x = x
  model.position.y = y
  model.position.z = z

  root.add(model)
  model.on('click', function(ev) {
   console.log(' model just clicked ! ');
   callback();
  });
})`

would you please tell me where am i doing wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions