WoW movement,distance,... menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    tttommeke's Avatar Banned
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    613
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WoW movement,distance,...

    Ok, these is a sort of article to explain some math in WoW.
    1. Distance between 2 points
    2. Rotation to a degree
    3. Rotato to Point - Rotation needed
    3.1 Rotato to Point - Rotation


    1. Distance between 2 points
    To measure the distance between 2 points you need to minilise the X and Y with the X and Y from the points you want to measure. So with this the code will look something like :

    (PointX - PlayerX) + (PointY - PlayerY)

    Wow, that was alot except one problem, what happens when their are -X numbers ? The distance will be then -145 or so ? Easy, how do we make numbers even in math ? We ² them :-D

    (PointX - PlayerX) ^ 2 + (PointY - PlayerY) ^ 2
    Ok, now we always get even numbers but another problem : all our numbers are now been (how do you say it in English) calculate with themself ? Or how must I explain it :P but most people would now what I mean, so we need to undo that ^ 2 and their is a math formula for it called Sqrt (if it is that called in English. So I will also put the explantion about it : Any nonnegative expression to get the square-root of).

    So :

    Sqrt ((PointX - PlayerX) ^ 2 + (PointY - PlayerY) ^ 2)

    Will give you a nice good number.
    An exemple :
    Point X = 5
    Point Y = -7
    PlayerX = 8
    Player Y = 9

    Sqrt((5 - ^ 2 + (-7 - 9) ^2) = Sqrt ((-3) ^ 2 + ( - 16 ) ^ 2) = Sqrt (9 + 256) = Sqrt (265) = 16,...

    So the distance between 2 points is 16.

    2. Rotation to degree

    Ok, you have the value of the current rotation of the player. Let's say it is : 3.541145... But what are we with it ? It just looks like a really ugly number or does it ?

    From this number we can set it to a degree and with a degree we can calculate how much the player needs to move his rotation to set it to a current point. So let's start.

    Rotation = 3.541145
    Pi = 3.14159265358979 (try to use the function in your program. AutoIT pi's calculation is : 4 * ATan(1))

    So : Rot * (PI * 4) will give you = 44 °

    So now you know that your current view is 44° in the WoW world (A view can be from 0 to 360 ° )

    3. Rotato to Point

    Ok, we have found our own degree etc but how can we calculate how our degree would be when we are pointing to a point ? Easily, with a sort of Tangens (don't know how to call it again in English :P). But we start from the beginning ! I have made here a nice picture how you calculate the tangens :


    Yhea, fun but how the **** must we know what is A and B <_<.
    Just another formula ^-^
    A = PointY - PlayerY
    B = PlayerX - PointX

    But is this math correctly ? Let's use an example.

    The X and Y are wrong, It must be : X is horizontal and Y is Vertical, just a little wrong drawing from me ;-).
    So i advise you, to check this if this is true take a paper and every 1 centimeter or so you do + 1 and then calculate :P But believe me, it is correct.

    Ok, so now we now the tangens, but we don't need the tangens ! We need to do the Atan * RadtoDeg so we Untangens it :P

    Easy code :
    ATan((PointY - PlayerY) / (PlayerX - PointX))
    (Some people see this as Tan ^ -1). Now we got again a nice good looking rot number. But wtf are we with a rot number ? Nothing so we are going to do the same as previous ^-^. But now if we look very good their will be a uneven number ! So we must kill that one but now it is easier then with ^2 we just do :

    Radtodeg = - 180 / Pi
    ATan((PointY - PlayerY) / (PlayerX - PointX)) * Radtodeg = Lovely degree :-D where we need to turn to !

    But then another problem came :-( their still can be an uneven needed rot. So we are going to do 2 checks a If PlayerX is smaller as PointX then he must check if the degree is under zero and when this happens you just do : Degree = Degree + 360. But when PlayerX is bigger or equal to PointX and the degree is smaller as zero you need to do : Degree = Degree + 360
    So the code will look like :

    If PlayerX < PointX And Degree < 0 then
    Degree = Degree + 360
    elseif PlayerX >= PointX And Degree < 0 then
    Degree = Degree + 360
    Endif

    Ok, so now we have calculated what rotation would be needed.

    3.1 Rotato to point

    We could do a slow way or a fast - tttommeke - way. Instead of rotating we use a sort of change it in memory tacktik. Because when you change it, your character will just follow you.

    So we found out that an object is like on 44° from the player and the current player his rotation is 85 ° So we just write in the memory to change it to 44 ° =P But then we need to deconvert it.

    So 44 * (PI / 180) is = 0,76794487087750501384642393813499

    Then we just do :

    _MemoryWrite(Playeraddress + Rotation Offset, $Handle, Degree * (PI / 180), 'float')

    Then he will insta switch himself to that point.
    Last edited by tttommeke; 11-07-2007 at 12:59 PM.

    WoW movement,distance,...
  2. #2
    Firefly192's Avatar Member
    Reputation
    14
    Join Date
    Jun 2007
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    :msn_disappointed:

  3. #3
    Kekko's Avatar Member
    Reputation
    4
    Join Date
    Oct 2007
    Posts
    84
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Lol my math sucks, dont even understand anything here :P

  4. #4
    kicko0o's Avatar Member
    Reputation
    1
    Join Date
    Nov 2007
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Haha, if someone still confuse try read again. Thanks for that info

  5. #5
    tttommeke's Avatar Banned
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    613
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Originally Posted by Firefly192 View Post
    :msn_disappointed:
    Mmmm, I'm feeling you don't understand it ?

    Originally Posted by Kekko View Post
    Lol my math sucks, dont even understand anything here :P
    This is math from the 3 year high school (or even less I think)

  6. #6
    randombob's Avatar Banned
    Reputation
    8
    Join Date
    Apr 2007
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Yes! Just what I've been looking for! I love you dude... :|

    +rep with whatever I can, when I can. :P

  7. #7
    Sebbe123's Avatar Banned
    Reputation
    6
    Join Date
    Mar 2006
    Posts
    77
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    -Nice one!

  8. #8
    tttommeke's Avatar Banned
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    613
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    That is enough for today :P Will post tomorow how you can rotate then ;-).

  9. #9
    Glynbeard's Avatar Mawd Authenticator enabled
    Reputation
    615
    Join Date
    Jul 2006
    Posts
    2,646
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Very nice. Something new and fresh. A lot of work went into this +reputation. I want to see more so keep it coming!

    Glyn

  10. #10
    tttommeke's Avatar Banned
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    613
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Originally Posted by glynbeard View Post
    Very nice. Something new and fresh. A lot of work went into this +reputation. I want to see more so keep it coming!

    Glyn
    Hehe thx, but next time I need to try to make this at a nice time like 10 PM or so and not at 2 AM after drinking 2 liters cola :P Would be more concentrated then :P

  11. #11
    Froogle's Avatar Legendary
    Reputation
    690
    Join Date
    Jan 2007
    Posts
    787
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Nice job tttommeke, grats on contributor! I'll need to read this very carefully sometime, I hate mornings .


  12. #12
    The Mars Volta's Avatar Active Member
    Reputation
    51
    Join Date
    Oct 2006
    Posts
    197
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Everyone who has been through at least the ninth grade should understand this stuff, unless you are in SpEd classes.

    The Mars Volta

  13. #13
    kc102's Avatar Member
    Reputation
    1
    Join Date
    Sep 2007
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Part 1 - Geometry
    Part 2 - Algebra 1/Basic Geometry
    Part 3 - Trigonometry or Calculus
    Message me for Basic Private Server Setup help.

  14. #14
    =sinister='s Avatar Contributor
    Reputation
    154
    Join Date
    Jun 2006
    Posts
    277
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    I have written Autoit Functions to calculate all but the Rotato to Point. Could you please explain more on how to find this? I did not understand any of it.

  15. #15
    tttommeke's Avatar Banned
    Reputation
    1
    Join Date
    Jul 2007
    Posts
    613
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: WoW movement,distance,...

    Aim: tttommeke

Page 1 of 2 12 LastLast

Similar Threads

  1. wow view distance. not camera distance.
    By gpowerpz in forum WoW Memory Editing
    Replies: 16
    Last Post: 05-24-2010, 03:30 PM
  2. [C++]WoW mouse movement
    By 0_00_0 in forum Programming
    Replies: 2
    Last Post: 06-08-2009, 01:09 PM
  3. wow general movement
    By pauk in forum Suggestions
    Replies: 2
    Last Post: 10-03-2008, 12:10 PM
All times are GMT -5. The time now is 03:47 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