Reputation: 31
Problem is, from what I can tell:
sf::FloatRect - has intersection functionality, but no rotation? sf::RectangleShape - has no intersection functionaly?, but rotation
how do you get both functionality's of the one Rectangle type shape?
Please, Once I understand how both to have a Rectangle of some sort be collidable by intersection functionality and be able to be rotated.
Scenario: Some game sprites will rotate and a collisionBounds Rectangle must mirror the sprites rotation
thanks, I really need to understand this once and for all.
Upvotes: 0
Views: 83
Reputation: 1544
sf::RectangleShape
has the methods getGlobalBounds()
and getLocalBounds()
, which return the enclosing sf::FloatRect
that you should use for doing intersections.
Upvotes: 1