2
votes

I implement the collision detection in my project so I have for each object an origin and max and min vertices so I can calculate the collision detection simply not accurate which is I want at that stage, but I may have many instanced objects which is only one object and is repeated many times in the vertex shader using the transformation matrices I passed to it. I do the collision test in the CPU so it doesn't know anything about the instances except the matrix array of them. can I apply the method I use for instanced objects?

1
Of course, just transform your bounding box using each object's matrix. - Thomas
That makes sense, Thank you @Thomas , I just like to accept it as the correct answer - Mohamed Mousa El-Kheshen
Now you can. Glad it helped! - Thomas

1 Answers

2
votes

Of course, just transform your bounding box using each object's matrix, then apply collision detection to the transformed boxes.