SFML community forums

Help => Graphics => Topic started by: Flaze07 on July 14, 2017, 06:11:41 pm

Title: direction shape faces when rotation is 0
Post by: Flaze07 on July 14, 2017, 06:11:41 pm
hi, is the direction of shape (rectangle) upward, left, right, or downward when it has the rotation of zero  ???
Title: Re: direction shape faces when rotation is 0
Post by: Laurent on July 14, 2017, 09:04:02 pm
cos(0) == 1 (X axis)
sin(0) == 0 (Y axis)

So, in default SFML coordinates, angle zero is towards the right.
Title: Re: direction shape faces when rotation is 0
Post by: Flaze07 on July 15, 2017, 04:51:45 am
I see...so it is not up...well the whole time I thought it was up ::)
Title: Re: direction shape faces when rotation is 0
Post by: Hapax on July 16, 2017, 12:44:07 pm
I'm not sure that a rectangle can be described that clearly as having a "direction". Is its width the direction of the rectangle or its height? I suppose it would depend on which is 'longer'.

If its rotation is zero, its width is to the right and its height is downwards.