Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Get edge and vertex information from sprite class - SAT

4: Adsense

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   

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!




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.