Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


Get edge and vertex information from sprite class - SAT


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Fantastical   Members   -  Reputation: 100

Like
0Likes
Like

Posted 04 January 2012 - 04:40 AM

Hi, I hope I have put this in the appropriate forum.

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!

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS