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

Author Topic: Change origin of rotation  (Read 8451 times)

0 Members and 3 Guests are viewing this topic.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Change origin of rotation
« Reply #15 on: June 29, 2014, 05:14:09 pm »
Rotation-wise the laser needs to be flipped so you could try inverting the rotation i.e. return -rotationAmount;

For a better understanding of how the laser reacts to different positions, try clicking on points all the way around the emitter ("tank") - not just horizontal and diagonals - and also different distances from it.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Tweezy

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Change origin of rotation
« Reply #16 on: June 29, 2014, 05:23:16 pm »
Rotation-wise the laser needs to be flipped so you could try inverting the rotation i.e. return -rotationAmount;

For a better understanding of how the laser reacts to different positions, try clicking on points all the way around the emitter ("tank") - not just horizontal and diagonals - and also different distances from it.

Holy moly that worked, I never would of thought to do that, what is your reasoning behind inverting the rotation?

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Change origin of rotation
« Reply #17 on: June 29, 2014, 05:28:31 pm »
what is your reasoning behind inverting the rotation?
I noticed that when the target was above, it was vertical, but when you went to the top-right, it leaned left. Also, when you weren't perfectly above (you were slightly to the right), it leaned slightly to the left.

Glad it worked and that I could be of some help :)
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Tweezy

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Change origin of rotation
« Reply #18 on: June 29, 2014, 05:29:51 pm »
what is your reasoning behind inverting the rotation?
I noticed that when the target was above, it was vertical, but when you went to the top-right, it leaned left. Also, when you weren't perfectly above (you were slightly to the right), it leaned slightly to the left.

Glad it worked and that I could be of some help :)

You have a keen eye Sir, thank you for pointing it out!

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Change origin of rotation
« Reply #19 on: June 29, 2014, 05:57:41 pm »
If you'd have clicking all around it in a circle, you may have noticed yourself that the rotation was going in the opposite direction. I wasn't sure which is why I asked you to try that clicking in a circle thing  ;)

I'm glad to help but please don't call me Sir  ;D
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*