Re: collision detection of spheres and meshes
From: ZMan (zman_at_thezbuffer.com)
Date: 12/31/04
- Previous message: ZMan: "Re: Using Managed DirectX in a dotNet ActiveX Control"
- In reply to: vidalsasoon: "collision detection of spheres and meshes"
- Next in thread: vidalsasoon: "Re: collision detection of spheres and meshes"
- Reply: vidalsasoon: "Re: collision detection of spheres and meshes"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 31 Dec 2004 11:30:01 -0800
Try getting Dave Eberly's book
http://www.amazon.com/exec/obidos/tg/detail/-/1558605932 There's a ton of
instersection stuff in there.
Typically though after ruling out collisions with the sphere/sphere you
would then try some tighter shapes such as a collection of AABB's. They are
tighter than a sphere but slowere to check but nowhere near as slow as mesh
intersection which will require you looping through each triangle of the
mesh. Try wrapping different parts of the model (e.g. head, arms, legs) in
different boxes. Often you will find that these boxes alone are close enough
for a collision in a game.
The other thing you can do is have a very very low polygon equivalent that
you use for your collision detection but remember even a 100 triangel model
means 10,000 triangle collision tests if you have to compare them all.
-- ZMan (zman@thezbuffer.com) http://www.thezbuffer.com News and Information for Managed DirectX "vidalsasoon" <kjobson@gmail.com> wrote in message news:1104433806.831201.94520@z14g2000cwz.googlegroups.com... >i have meshes with a bounding sphere around them. Now, when a sphere > touches a another sphere around a mesh I would like to refine my > collision detection to sphere vs mesh. How do i find out the correct > vector that pushes my sphere away when it touches any part of the mesh. > my problem is that even if i know the spheres are touching, I dont know > how to do this with meshes. > > I'm guessing that I have to check every polygon of the mesh and check > its distance is less than or equal to zero then find the polygons' > normal to reverse it. > > is this a good technique? some C# code sample using a BoundingSphere > tested against a meshs' polygon would be nice. >
- Previous message: ZMan: "Re: Using Managed DirectX in a dotNet ActiveX Control"
- In reply to: vidalsasoon: "collision detection of spheres and meshes"
- Next in thread: vidalsasoon: "Re: collision detection of spheres and meshes"
- Reply: vidalsasoon: "Re: collision detection of spheres and meshes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|