i have a little problem. For the collision in SFML, i use the intersects() function.
But this works with a rectangle. How do you block the character with a triangle, or a rotated shape like the one on this screenshot ?
i have a little problem. For the collision in SFML, i use the intersects() function.
But this works with a rectangle. How do you block the character with a triangle, or a rotated shape like the one on this screenshot ?
I am for this problem using PixelPerfectCollision(sf::Sprite &object1, sf::Sprite object&2) from Collison namespace which i found on github-sfml collision. I usually make new Collision.h and Collision.cpp to my project directory.