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

Author Topic: Degrees problem  (Read 1280 times)

0 Members and 1 Guest are viewing this topic.

LeluLelu

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Degrees problem
« on: October 15, 2017, 05:21:07 pm »
Hi there!! I have a problem with entity.getRotation() . I saw that it returns the rotation in degrees so if i want to put the function in a condition   EX:   if(entity.getRotation() > 45) {//things happens }   it won't work.
Thx!!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Degrees problem
« Reply #1 on: October 15, 2017, 05:23:34 pm »
"It won't work" is not a problem description, read the following thread on how to ask for help on the forum: https://en.sfml-dev.org/forums/index.php?topic=5559.0
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

LeluLelu

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: Degrees problem
« Reply #2 on: October 17, 2017, 03:26:48 pm »
By "it won't work" i mean that the "if" condition will never return true.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Degrees problem
« Reply #3 on: October 17, 2017, 03:44:25 pm »
Then getRotation() never returns a number larger than 45, which means that your expectation of returned value is probably wrong.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything