Game Development Reference
In-Depth Information
Figure 4.12. Edge(Arc)-Cap C overlap test: (a) n ( e ) ∈C⇒G ( e ) ∩C ≡ ;(b)
G ( e ) ∩C≡ , with δ Pe ;(c) n 0 , n 1
/∈C but edge overlaps C ; (d) and(e) edge arc's
great circle overlaps C .
One test to do that is to check that the bisector n 0 + n 1 is in the hemisphere of s
and not
s .If( n 0 + n 1 )
·
s > 0, the edge intersects
C
(see Listing 4.3, function
overlap ):
P (
x : n ·
x =0 , n = s
G
( e )) =
{
×
e
}
.
(4.7)
4.6.5 Supporting Shape Fallbacks
Sometimes the “almost aligned” contact features may be aligned with the contact
plane but may not quite intersect when projected onto it. Even if there is a slight
misalignment between them, we may still proceed to generate a single (approxi-
mate) contact point. This kind of misalignment is not statically stable and is rare
enough to be usually corrected the next frame. If it's not, it means the objects in
close contact do not have stable contact (edge firmly resting on face, or face on
face). To generate an approximate contact point, we need to choose the point on
one shape that's closest to the other shape. SAT always returns a vertex as one of
the contact features, except in the case of the edge-edge feature pair. If we have a
vertex, we can use it to generate the single contact point. If we have an edge-edge
 
Search Nedrilad ::




Custom Search