SFML community forums

Help => General => Topic started by: LeluLelu on October 15, 2017, 05:21:07 pm

Title: Degrees problem
Post by: LeluLelu 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!!
Title: Re: Degrees problem
Post by: eXpl0it3r 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
Title: Re: Degrees problem
Post by: LeluLelu on October 17, 2017, 03:26:48 pm
By "it won't work" i mean that the "if" condition will never return true.
Title: Re: Degrees problem
Post by: eXpl0it3r 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.