1 min
The first post in making collision for mario kart in DirectX12
DirectX12 already has implementation for an orientated bounding box collider.
Instantiated this collider in the PhysModel class with the centre, size, and rotation being the position, size, and rotation of the parent GameObject. However the centre of the collider was not at the centre of the mesh.
To initially fix this an external tool was used to get the vertices of the mesh in a vector in PhysModel (this was originally intended for track collision). Then a linear search was used to find the top and bottom most corners of the mesh from the vertices vector which could then be averaged to find the centre of the mesh and one corner was used to find the size of the mesh.
Subscribe to this blog via RSS.
C++ 30
Directx12 11
Mario kart 11
Commercial games development 15
Unity 15
Low-level programming (19) C++ (30) Text based adventure (5) Ex-machina (9) Game engine programming (11) Directx12 (11) Mario kart (11) Land of gold (5) Audio visual production (1) Commercial games development (15) Unity (15) Don't walk by (15)