[Solved] Rotation menu

User Tag List

Results 1 to 4 of 4
  1. #1
    blacknight962's Avatar Member
    Reputation
    1
    Join Date
    Jul 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The title of this thread has been removed.

    The content of this post has been removed.
    Last edited by blacknight962; 09-14-2014 at 09:03 PM.

    [Solved] Rotation
  2. #2
    Ryns's Avatar Member
    Reputation
    19
    Join Date
    Oct 2009
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by blacknight962 View Post
    The above returns 2.03122, and the correct rotation is 5.17278(?).
    5.17278 - 2.03122 = 3.14156 ... or as it prefers to be called Pi

    So you are calculating the opposite angle, the math is the wrong way around, try:

    Code:
    atan2(targetY - currentY, targetX - currentX);

  3. #3
    blacknight962's Avatar Member
    Reputation
    1
    Join Date
    Jul 2008
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The content of this post has been removed.
    Last edited by blacknight962; 09-14-2014 at 09:01 PM.

  4. #4
    psyf4's Avatar Private
    Reputation
    2
    Join Date
    Jul 2010
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2*PI + -1.11038 = 5.1728, so yes, it's the same. However if you're trying to rotate by a certain amount rotating by -1.1104 would be much faster than my 5.1728 (if you rotating using keyboard or whatever your problem is, if it is limited to a certain amount of degree or radian per second; interestingly, wow rotates by PI radian per second).
    If you must have a positive value, learn a bit of trigonometry (Wikipedia: Unit Circle) and you'll quickly understand why you just need to add 2*PI (one full rotation). If you want to go through a rotation (like I do using the keyboard), subtract 2*PI if (while) angle > PI.
    ie
    //This will make sure you never go more than 180 rotating with the keyboard, even if somehow you added more than one full rotation
    while rotation > PI: rotation -= 2*PI
    while rotation < PI*-1: rotation +=2*PI

    or
    if rotation > PI: rotation -= 2*PI
    if rotation < PI*-1: rotation += 2*PI

    or in your case
    if rotation < 0: rotation += 2*PI

Similar Threads

  1. Solve this for rep!
    By Gelormino in forum Community Chat
    Replies: 21
    Last Post: 09-22-2007, 01:14 PM
  2. if you solve this i will reward you
    By Ark in forum Gaming Chat
    Replies: 39
    Last Post: 08-08-2007, 12:56 PM
  3. [AutoIT3] WoW Cordinator (X,Y,MapID and rotation memory reading)
    By Vladinator in forum World of Warcraft Bots and Programs
    Replies: 22
    Last Post: 05-15-2007, 03:26 AM
  4. Steady shot rotation = faster ranging
    By Salad in forum World of Warcraft Exploits
    Replies: 8
    Last Post: 04-08-2007, 08:04 PM
All times are GMT -5. The time now is 06:50 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search