Dante-666 / bouncy-ball

hello world game for g3d development and learning
1 stars 0 forks source link

Implement collision shape construction from Mesh #12

Closed Dante-666 closed 4 years ago

Dante-666 commented 4 years ago

This will make the 3D object to Physics interactions more natural and sizes would remain exact.

Dante-666 commented 4 years ago

This has an object, ArticulatedModel::Mesh and stored as Array<Mesh*> m_meshArray; in the Model.

There is an equivalent counterpart for this in Bullet called btBvhTriangleMeshShape which is supposed to be used with static shapes and must be explored next. Let's figure out how to do this for simple shape and then move on to move complicated ones later, best thing would be the ground plane which was added that renders like shit but the geometry is fine.

As a first implementation, do this only for fixed shapes as animated shapes might bring in more trouble.

Dante-666 commented 4 years ago

This looks done, for some reason, planar meshes have some collision issues and objects pass through but I am guessing that won't happen with other shapes, slightly titling the object makes it better.

Dante-666 commented 4 years ago

Added a curved bowl type of object and multithreaded-physics. It looks like it doesn't cause too much framedrop or lag and threads are being used although not 100%. Getting a SegV but this is kindof unrelated. Add the issue for the next milestone.