Nooo! I can’t spend the rest of this break playing the Skyrims I got for Christmas. I’m supposed to be making Wing Commander for crying out loud.
The big thing from today and yesterday was creating a basic physics system for the 3D objects. So far I’m crossing my fingers that I can get away with something much, much simpler than Neon Galaxy has: no kinematics, no continuous collision detection, just simple detection of overlaps between arbitrarily oriented spheres and/or boxes. An excellent trick for detecting overlaps that makes this much easier (which I also used in A. CYBORG) is to transform one of the objects into the other’s coordinate space. Then instead of testing, say, two arbitrarily oriented boxes against each other, you can just test one arbitrary box against an axis-aligned box, a much simpler problem. (The answer to that one is to find the minimum and maximum points on the arbitrary box and see if there are any axes which seperate the two — thus the “seperating axes theorem” — then repeat with the two boxes switched.)
To be honest, I haven’t actually tested that one yet; what you see above is instead testing sphere-box collision, which would be used for detecting if bullets are hitting a target. This is a much simpler matter of transforming the sphere into the box’s space, then clamping its position to the box to find the nearest point on the box, then checking the distance between the two against the sphere’s radius.
Notes
-
mayflystudio posted this