Sign in to follow this  
ua4192

pick mesh issue import mesh

Recommended Posts

Hi.

I have a problem when trying to pick meshes from an imported mesh (GLTF 1.0 file).

My problem is that scene.pick method is returning null always. Only when I am very close to the mesh I am able to pick the mesh but always the same mesh.

I have read other posts from other people having the same problem, but not sure about the solution.

In my example I am not transforming anything (moving neither rotate), just loading the GLTF that contains submeshes inside (in the inspector you can see the product structure of the GLTF) but not able to pick anything.

I am using BABYLONJS 3.0.

Any clues?

Best regards

Share this post


Link to post
Share on other sites

Yes.

I am sure that all meshes in the GLTF file are Pickable, Visible and Enabled.

When I import the GLTF file I set all meshes contained with these settings. This was my first thought.

And I checked it by putting a trace for each mesh contained in the GLTF.

In deed, It is really strange but picking works but only when I am very close to the mesh. The mesh exceeds the frustum. When I zoom out it doesn't work.

Best regards

Share this post


Link to post
Share on other sites

Hi.

Here you can see:

http://www.babylonjs-playground.com/#QG91RX#4

In theory when mouse was over the mesh it should display the name and point 3D coordinates and also change the color.

You will see that coordinates are always (NaN, NaN, NaN) and the mesh is not properly recognized and that color is not properly changed, just some meshes are recognized.

It is really a bug in my opinion.

It happens with all models I have tested.

Best regards

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.