# The Industry's Foundation for High Performance Graphics

1. ## Slide on surface

I'm attempting to 'snap' two parts of geometry together, without actually combining the meshes. I want for the second mesh to be able to slide across the surface of the first mesh, and I am unsure of how to proceed.
Thanks,
-DO

2. ## Re: Slide on surface

Mehes don't know anything about sliding etc. You control that in your program logic. To give the appearance of one mesh on another you just make the min y value of the mesh on top equal to the max y value of the mesh underneath

3. ## Re: Slide on surface

Thank you, I know of the method of which you are speaking, I have seen it implemented. For example, a character walking along the ground. However, I don't quite understand how it would work for moving a model completely around the surface of another. At some point the model would be totally sideways on the other, and at other times upside down.

Do you think that getting the normal information from the parent model, and then inverting its directional value would work?

4. ## Re: Slide on surface

Certainly the normal for a triangle will give you "up".

Knowing what triangle to check is the hard part. That is a design problem that you have to solve for yourself because it depends on exactly what you program is doing.

5. ## Re: Slide on surface

If you can think of any tutorials, or books that might help, I would appreciate it.

6. ## Re: Slide on surface

Have a look at http://www.humus.name
Most of his stuff is for DirectX but it might help. Apart for DirectCompute there is a one-to-one for any function between DirectX and OpenGL

7. ## Re: Slide on surface

Also to useful books are
Mathematics for 3D Game Programming and Computer Graphics by Lengyel

and

Real-Time Rendering by Akenine-Moller

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•