SFML community forums
Help => Graphics => Topic started by: Gauzr on June 05, 2015, 11:11:27 pm
-
Hi, I'm a bit uncertain on how I can get the value of a shape's Y coordinate. I tried doing
float shapeycord = shape1.getPosition.y();
if (shapeycoord == -100)
...
However I know this is not right. Does it have to be pointer to FloatRect? Im a bit confused. What I would like to do is get the .y coord of the shape, and if it contains a certain y coordinate, then it will do something.
-
Ah, I believe I fixed it by changing it to shape.getPosition().y, that is I think.
-
shape.getPosition().y
looks much better :)