Members - Reputation: 100
Posted 04 January 2012 - 04:40 AM
I am working on implementing a separation of axis theorem into my engine simply so that rectangular sprites do not merge into each other. I apologise for the fact that there is already a bunch of of threads on SAT, but where im having my trouble is getting the edge to use as the axis and the points to project onto my access. I am using objective c, opengl and glkit but it these specifics aren't important for this problem I dont think.
At the moment I am have these instance methods in my sprite class to access a point by sending it a number between 1 and 4 to return a point position, and the same for getting the edge.
I have size, position and rotation properties which I can access but I am especially confused on how to get the edge vector to project the points onto.
Thanks, I would really appreciate any help!