Using zRot to caculate unit facing? menu

User Tag List

Results 1 to 12 of 12
  1. #1
    localhostage's Avatar Member
    Reputation
    1
    Join Date
    Aug 2007
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using zRot to caculate unit facing?

    Hey guys, need a little help here

    So I have zRot and it seems to be either 1 to -1

    How would I go about translating that into degree's? Or better yet: given an x,y position how would you face another x,y position with the zRot?

    If I can just get these last bits figured out, I'd be so close to releasing a nice bot for AV.

    Any help would be greatly appreciated, thanks!

    Using zRot to caculate unit facing?
  2. #2
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,943
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    there is an address that changes what direction you are facing lol

  3. #3
    localhostage's Avatar Member
    Reputation
    1
    Join Date
    Aug 2007
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean there is a address to which direction your toon is facing? That helps, using that how would I go about finding another X,Y coord and check if I'm facing it? Also could you share that address?

    Thanks

  4. #4
    alek900's Avatar Contributor
    Reputation
    103
    Join Date
    Nov 2007
    Posts
    101
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by localhostage View Post
    You mean there is a address to which direction your toon is facing? That helps, using that how would I go about finding another X,Y coord and check if I'm facing it? Also could you share that address?

    Thanks
    i use this in autoit
    Code:
    ;Cur_Coords[1] = players y coord
    ;Cur_Coords[0] = Players x coord
    ;Tar_Coords[1] = Target y coord
    ;Tar_Coords[0] = Target x coord
     Target_Rot = _Degree(ATan( (Cur_Coords[1]-Tar_Coords[1]) / (Cur_Coords[0]-Tar_Coords[0]) ))
    
    If Tar_Coords[0] < Cur_Coords[0] Then
          Target_Rot += 180
     EndIf
    If Target_Rot > 359 then Target_Rot -= 360
    If Target_Rot < 0 Then Target_Rot = 360-(Target_Rot*-1)
    i hope it helps

    and
    Code:
    0x00BBD204 = player y
    0x00BBD200 = player x
    edit: wtf, i cant use $text inside the code tags?!
    Last edited by alek900; 03-08-2008 at 05:24 PM.

  5. #5
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,943
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    lol mine isnt degree's like that and no sorry im not gonna share the address since it can be used to find other things (/cough x/y/z coords /cough) but i cant find the damn MapID address since the addresses change every time your map changes -.-

  6. #6
    alek900's Avatar Contributor
    Reputation
    103
    Join Date
    Nov 2007
    Posts
    101
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kth_prkns View Post
    lol mine isnt degree's like that and no sorry im not gonna share the address since it can be used to find other things (/cough x/y/z coords /cough) but i cant find the damn MapID address since the addresses change every time your map changes -.-
    map id is at 0x008F0310

  7. #7
    Flos's Avatar Member
    Reputation
    49
    Join Date
    Feb 2008
    Posts
    146
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I'm not mistaken your function lets the character always turn into one direction (ergo it always turns right, even if you need to turn 350°).

    If this is not the case then I made some really unnecessary calculations in my bot ^^

  8. #8
    alek900's Avatar Contributor
    Reputation
    103
    Join Date
    Nov 2007
    Posts
    101
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Flos View Post
    If I'm not mistaken your function lets the character always turn into one direction (ergo it always turns right, even if you need to turn 350°).

    If this is not the case then I made some really unnecessary calculations in my bot ^^
    that function only calculates the angle from player to waypoint.

    i use a different function to calculate the rotation the player needs to make and what way is fastest to turn to reach the correct rotation.
    Last edited by alek900; 03-08-2008 at 08:21 PM.

  9. #9
    radegast's Avatar Member
    Reputation
    5
    Join Date
    Jan 2008
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there,

    i use a little bit different way to calculate character facing angle and direction to a waypoint.

    I use x, y, H-rot and V-rot coordinates from TLS. From H-rot, V-rot with some little math you can calculate facing angle and using x and y coords you can calculate angle from player to waypoint. Using TLS is better for future use, you don't need find any static offset with a new patch ...

    And map ID ... I found two addresses in 2.3.3 , where mapid changes:

    0xC466A4 - zone ID ->little area (e.g. Fairbreeze Village in Eversong Woods)
    0xB88948 - map ID -> big area (e.g. Eversong Woods)

    Check It for zone'id ... try move from zone to zone ...
    Last edited by radegast; 03-09-2008 at 06:45 AM.

  10. #10
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,943
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by alek900 View Post
    map id is at 0x008F0310
    i prefer to know HOW u got it instead of leeching the address =P

  11. #11
    alek900's Avatar Contributor
    Reputation
    103
    Join Date
    Nov 2007
    Posts
    101
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kth_prkns View Post
    i prefer to know HOW u got it instead of leeching the address =P
    cheat engine and trail and error.

  12. #12
    Sychotix's Avatar Moderator Authenticator enabled
    Reputation
    1421
    Join Date
    Apr 2006
    Posts
    3,943
    Thanks G/R
    285/572
    Trade Feedback
    1 (100%)
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    yeah but that dosnt help very much -.- ive already tryed those (except for using cheat engine cuz i use a better memory editor)... i already know the values of the maps but the addresses change every time i change maps.

    EDIT: oh and for the person that wanted the address for the direction your facing, here ya go since some1 else gave me an address.
    Code:
     [Wow.exe+A60BB8]+0xBEC
    Last edited by Sychotix; 03-09-2008 at 04:34 PM.

Similar Threads

  1. [Lua Script] how can I use more "Unit"s in one LUA file
    By Gix85 in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 06-27-2011, 02:00 AM
  2. Unit-facing value oddities
    By bad6oy30 in forum WoW Memory Editing
    Replies: 2
    Last Post: 01-16-2011, 07:05 PM
  3. Enumerating Units using an Arcemu Core?
    By TelepathicIndian in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 07-01-2009, 03:37 AM
  4. Unit/Player Facing for Z axis
    By g3gg0 in forum WoW Memory Editing
    Replies: 15
    Last Post: 01-17-2009, 09:53 AM
All times are GMT -5. The time now is 12:53 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