#### Archived

This topic is now archived and is closed to further replies.

# how to use Mesh.Intersect

This topic is 5269 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

does anyone know how to use Mesh.Intersect? i have no idea what they mean by rayPos, rayDir..etc..

##### Share on other sites
The function is meant to test to see if a ray intersects your mesh. A ray has two components: an origin and a direction. If there is an intersection between the ray and th emesh, the function will return the face that was intersected, along with the barycentric coordinates of the intersection point.

If this sound like Greek to you, then you probably aren''t in a situation where you need this function.

Are you trying to do something specific or was this just a general question?

neneboricua

##### Share on other sites
i just havent figured out how to actually *use* mesh.intersect,

im trying to test collision between a Car mesh and a Wall mesh,

pent

##### Share on other sites
If you are trying to test collisions between a wall mesh and a car mesh you wouldn''t even be using mesh intersect. Look into bounding volumes. The idea is using a simple type object to contain your mesh and depending on how it collides, the results will effect your mesh.

Also collisions are one of the more, if not most, difficult aspects of game development. So if you don''t know about ray direction. You still have years ahead of you, including a course in college level linear algebra and a couple years of physics.

Also I am almost done with ellipsiod collisions based off of this link. Smart guys, the quadratic equation for finding line to point and line to line distances (including point of closest intersection) is a must.

http://www.peroxide.dk/papers/collision/collision.pdf

If anyone would like all my source is open, just email me.

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13

• 14
• 10
• 23
• 9
• 49
• ### Forum Statistics

• Total Topics
632639
• Total Posts
3007587
• ### Who's Online (See full list)

There are no registered users currently online

×