I want to make a winning decision with OpenGL.

Asked 1 years ago, Updated 1 years ago, 112 views

I'd like to set limits on the range of movement on the game stage and ride on the box.

To do so, you need to receive information that 3D objects are in contact.

In the case of 2D, I can find materials such as the 3 square theorem, but I can't find materials in 3D.

In the case of 3D, how do you sense the contact of objects?

c++ opengl

2022-09-30 19:38

1 Answers

In the case of 2D games, we define squares that cover characters, and I think we determine roughly whether or not the squares overlap each other.
After that, I think we will make a detailed collision decision using the decision that matches the character's shape.

There is a way to define a cube AABB (Axis-Aligned Bounding Box) that encloses characters in 3D, and to determine if the cubes overlap each other.
After that, AABB repeatedly determines the collision for each part of the character, and eventually drops the collision determination in polygons, but depending on the accuracy of the collision determination, it will change how far you go.

I can't explain the detailed formula here, so please consider purchasing a book.
What I use for studying and developing is
Ms. O'Reilly's https://www.oreilly.co.jp/books/9784873113777/
That's it.

"By the way, the reason why square judgment is often used is ""the least computational cost."""

Is that the answer you are looking for?


2022-09-30 19:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.