Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: direction shape faces when rotation is 0  (Read 1697 times)

0 Members and 1 Guest are viewing this topic.

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
direction shape faces when rotation is 0
« 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  ???

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: direction shape faces when rotation is 0
« Reply #1 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.
Laurent Gomila - SFML developer

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Re: direction shape faces when rotation is 0
« Reply #2 on: July 15, 2017, 04:51:45 am »
I see...so it is not up...well the whole time I thought it was up ::)

Hapax

  • Hero Member
  • *****
  • Posts: 3351
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: direction shape faces when rotation is 0
« Reply #3 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.

Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*