Jump to content
  • Advertisement
Sign in to follow this  
Fantastical

Get edge and vertex information from sprite class - SAT

This topic is 2538 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!