Closed akosgarai closed 4 years ago
Other interesting tutorial: https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_collision_detection
Currently, the meshes only stores the vertices, indices, center point, etc. But i haven't got information about the object itself. It makes the collusion detection hard. To be able to handle this, i will define bouncing objects, that could be used for collision detection.
I have written an application for supporting the collision detection.
First collision detection that i should implement: between the camera and a ground / grass whatever floor. The ground in general a textured rectangle. It has to contain a bounding box. The center point of the box is the center point of the plane. The size is plane's size, except the height. It has to be an acceptable small number. The camera could be represented with a sphere.
I think, i should implement #98 first. Now the camera movement is handled in the update function in the applications. It makes the collision detection difficult. I have to put it in the application before doing the hard part of the detections.
Next steps for the implementation:
type
has to be added to the boparams map (values: AABB, Sphere)coldet.Check*
function.The POC is done. The camera movement is tested against the other meshes. The movement is skipped if it leads collision.
https://learnopengl.com/In-Practice/2D-Game/Collisions/Collision-detection
Also an example application needs to be implemented as POC. The house application could be a base of this.