S
S
s2sk2018-02-01 16:52:54
C++ / C#
s2sk, 2018-02-01 16:52:54

Collision in the game with triangles?

Hi all.
Can you please elaborate on how triangle collision is done? I know it's bullshit, but it's still interesting.
"The line of intersection of the planes is built, and then the projections of the triangles onto this line are compared"
One person told me to do this. But I'm zero in geometry, and I wanted to ask here. How to understand the "line of intersection of planes"? How to understand "flatness"? How to understand "projection of triangles on this line"? How to compare them? It is possible, please, with examples and formulas (it is desirable to give formulas with functions in C ++). Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2018-02-01
@BasmanovDaniil

There is a good site geomalgorithms.com with algorithms from computational geometry, including the triangle intersection algorithm . In addition, there is also Paul Bourke and his publications . But, generally speaking, I would not advise writing such algorithms on your own, they are very difficult to develop and test, for such things it is better to take a ready-made library .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question