I work for a while on a minecraft game (voxel). I am front a problem for a long time about the collision detection. I want recover the cubes collision from my highlighted black's cube like on the picture , but only on the sides. And not on the edges ! Actually i got all cubes in red and green when i check with the boundingBox method. Actually i use the method with the class "BoundingBox" to check for collisions. Can anyone help me or direct me on the best way for retrive the right cube ?
Code example with the boundingBox methode for check the collision
List<Node> nodeParent = regions[modelSelected.regionIndex].Nodes[modelSelected.Id].Where(m => modelSelected.BoundingBox.Intersects(m.boundingBox)).ToList();
i want to get only the green cube and not the red .. From the black cube in the middle
Thank's a lot guy