About pointer and meshes

Hi all…
I want to carry a mesh with my pointer. I did something but yhey are so far from each other. How can i keep closer pointer and mesh? Any idea? Any suggestion?

My PG: https://www.babylonjs-playground.com/#UZ23UH#149

Hi Buzul,

Sorry, I’m not sure I understand what effect you’re going for. Are you trying to have the mesh always appear under the cursor, essentially replicating the behavior of click-and-drag but without requiring the click?

Absolutly right… As you can see in my PG sample that mesh and pointer far from each other. I want the mesh and pointer side by side and where is going pointer mesh should be follow it.
How can i do this? Any idea?

Check out this answer to earlier question Pointer position over mesh

1 Like

@JohnK thanks for your reply. It’s nice. I have got one more question at this point.
Those sample working but it’s outside. How can i take the inside of the mesh?

Sorry do not know what you mean.

I checked the link in your previous post, and i did some thing with this tip. But triangel on the surface of the spheare. How i can take it to the inside?

Place it on a surface of a slightly smaller sphere inside the sphere?

No. Want to place directly on the inner surface of the sphere.

Sorry no idea.

Is there any idea about this? Masters? @Wingnut @Deltakosh

Hi B! I thought about what @JohnK said about the smaller sphere inside the bigger sphere, and that gave me an idea.

Why not make triangle invisible, and then parent ANY mesh to “bottom” of triangle?

https://www.babylonjs-playground.com/#2C8LVE#17

Looks ok. Sphere is CURRENTLY partially transparent, so we can see the box. Sphere is also using edgesRenderer for easier facet-seeing (else it needs better lighting-angles so sphere flat-shading looks nicer).

Box seems-to-be inside the sphere, seems-to mouse-track ok. Thoughts?

2 Likes

@Wingnut thanks for your quick reply. I’ll try this at the morning and i’ll let you know… Thank you…

Hi @Wingnut. I applied your solution to my project. It’s working fine. Thank you.

2 Likes