Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am trying to get collisions of bullets working, and am using SFML. I am using code to get the position of the points of the rectangle for collisions, however I think there's a way to do this without having to get points but by simply getting the points from SFML, since the shape is a rectangle and the points are stored in that way. Is there a way to do that? Through a combination of getPoint() and getGlobalBounds() maybe?

share|improve this question
add comment

closed as unclear what you're asking by Josh Petrie Dec 20 '13 at 16:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

  1. use getLocalBound of sprite
  2. Get transform of sprite
  3. use transformPoint of that transform to transform a point to its rotated coords

Also you can visit my post on SFML forums:

http://en.sfml-dev.org/forums/index.php?topic=12604.0

share|improve this answer
    
lol, nice coincidence since I was the one answering your post in the forum x) –  Grimshaw Aug 12 '13 at 18:03
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.