Hi.
I am creating a 3d T-shirt configurator and for design images and texts on it I use decalGeometry.
You can imagine that we want to control the position of one mesh in the scene upon another mesh.
How Can I do that?
I want to limit the right, left, up, and down positions till the mesh(decal geometry) does not go out of the main mesh.
Is there any way to understand the position of each edge of each mesh?
There’s no edges in 3D in the way you’ve described (3D edge is a connection between two vertices, it limits a volume, not a shape.)
To detect whether you’re dragging a decal outside of a mesh, you can just use raycasting - raycaster will stop intersecting the mesh as soon as the pointer leaves the mesh.
1 Like
but I don’t use a mouse and raycaster for moving.I have separate buttons