SFML community forums
Help => Graphics => Topic started by: lohr on June 25, 2008, 11:32:30 am
-
Hello,
I am want to program a little racer game, so i have to check for the border of my race circuit.
Now I was wondering about, that the Sprite class has no function "intersects" but rectangle has it?
How could I solve my problem best, because my car sure has to move :) Could i use a Rect instead of Sprite or are there other possibilities?
Best regards,
Alex "lohr"
-
Was'nt there a new function in 1.3?
IsPointInside, play around whith that one?
-
Hm i cant find this function...in which class is it?
EDIT:
I will do it now with an invisible Rect Object and the contains() method.
If you have better solutions, let me know ;)
-
It's still in the roadmap, which means it hasn't been implemented in version 1.3.
However you can do it quite easily. The only tricky part is if you need to apply any rotation.
-
Hm ive done it now with the contains-method from rect :) and i calculate the 3 other edges every time...