Archaeology world object orientation? menu

Shout-Out

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    gerardolm's Avatar Member
    Reputation
    -5
    Join Date
    Dec 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Archaeology world object orientation?

    Hi.

    I've been playing with WoW memory reading for a bit, and so far I've been able to get XYZ coords and color (red, yellow, green) for archeology objects.

    My problem is that the object's rotation/orientation always comes up as 0. This makes no sense as it should work as every other object in the game unless it's a rotation measured relatively to its parent, etc...

    Any thoughts? (I think my offsets are not wrong because I can get the right rotation for everything else that I tried)

    Thanks for reading.

    Archaeology world object orientation?
  2. #2
    andy012345's Avatar Active Member
    Reputation
    59
    Join Date
    Oct 2007
    Posts
    124
    Thanks G/R
    0/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you handling rotation correctly? IIRC it was turned into a packed vector of the pitch roll and yaw.

  3. #3
    gerardolm's Avatar Member
    Reputation
    -5
    Join Date
    Dec 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, that makes sense... I hadn't checked before, but I'm getting rotation 0 for all world objects (I'm getting the right one for all entities and units, but of course they're stored differently).

    I'll look into it

    Edit: Ugh, I can't find the offset for pitch, yaw and roll in game objects.
    Last edited by gerardolm; 12-28-2010 at 10:00 PM.

  4. #4
    andy012345's Avatar Active Member
    Reputation
    59
    Join Date
    Oct 2007
    Posts
    124
    Thanks G/R
    0/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a descriptor, GAMEOBJECT_ROTATION iirc.

    Edit: No it's not it's in the movement block of SMSG_UPDATE_OBJECT.

    Code:
        if (flags & 0x200)
        {
            double tmp;
            if (GetOrientation() < M_PI)
                tmp = sinf(double(GetOrientation()) / 2.0f);
            else
                tmp = -sinf(double(GetOrientation()) / 2.0f);
    
            tmp *= 0x100000;
    
            uint64 rot = tmp;
    
            //someone tell me if they find something with a rotation on other axis
    
            *data << rot;
        }
    Last edited by andy012345; 12-28-2010 at 10:32 PM.

  5. #5
    Silinoron's Avatar Private
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Er...
    Code:
    enum EGameObjectFields
    {
    	OBJECT_FIELD_CREATED_BY = OBJECT_END + 0x0,
    	GAMEOBJECT_DISPLAYID = OBJECT_END + 0x2,
    	GAMEOBJECT_FLAGS = OBJECT_END + 0x3,
    	GAMEOBJECT_PARENTROTATION = OBJECT_END + 0x4,
    	GAMEOBJECT_DYNAMIC = OBJECT_END + 0x8,
    	GAMEOBJECT_FACTION = OBJECT_END + 0x9,
    	GAMEOBJECT_LEVEL = OBJECT_END + 0xA,
    	GAMEOBJECT_BYTES_1 = OBJECT_END + 0xB,
    	GAMEOBJECT_END = OBJECT_END + 0xC
    };
    ...yeah.

    EDIT: Isn't gameobject rotation a quaternion?

  6. #6
    gerardolm's Avatar Member
    Reputation
    -5
    Join Date
    Dec 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Silinoron View Post
    Er...
    Code:
    enum EGameObjectFields
    {
    	OBJECT_FIELD_CREATED_BY = OBJECT_END + 0x0,
    	GAMEOBJECT_DISPLAYID = OBJECT_END + 0x2,
    	GAMEOBJECT_FLAGS = OBJECT_END + 0x3,
    	GAMEOBJECT_PARENTROTATION = OBJECT_END + 0x4,
    	GAMEOBJECT_DYNAMIC = OBJECT_END + 0x8,
    	GAMEOBJECT_FACTION = OBJECT_END + 0x9,
    	GAMEOBJECT_LEVEL = OBJECT_END + 0xA,
    	GAMEOBJECT_BYTES_1 = OBJECT_END + 0xB,
    	GAMEOBJECT_END = OBJECT_END + 0xC
    };
    ...yeah.

    EDIT: Isn't gameobject rotation a quaternion?
    That's parent rotation. It's giving me weird/wrong values all the time... I can't seem to find any memory offsets that point to object rotation/orientation (other than units).
    Last edited by gerardolm; 12-28-2010 at 10:49 PM.

  7. #7
    Silinoron's Avatar Private
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Andy is right. That uint64 is a packed quaternion:
    Code:
            public Quaternion ReadPackedQuaternion()
            {
                var packed = ReadInt64();
                var x = (packed >> 42) * (1.0f / 2097152.0f);
                var y = (((packed << 22) >> 32) >> 11) * (1.0f / 1048576.0f);
                var z = (packed << 43 >> 43) * (1.0f / 1048576.0f);
    
                var w = x * x + y * y + z * z;
                if (Math.Abs(w - 1.0f) >= (1 / 1048576.0f))
                    w = (float)Math.Sqrt(1.0f - w);
                else
                    w = 0.0f;
    
                return new Quaternion(x, y, z, w);
            }

  8. #8
    gerardolm's Avatar Member
    Reputation
    -5
    Join Date
    Dec 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the thing is I'm getting the same values over and over (uint64 = 0) even though it's clear in-game that the orientation has changed ><.

    Also, judging by the +0x4 and +0x8, either GAMEOBJECT_PARENTROTATION is 4 bytes (32 bits) or 16 bytes (I guess enums are uint based and not byte based).
    Last edited by gerardolm; 12-28-2010 at 11:01 PM.

  9. #9
    andy012345's Avatar Active Member
    Reputation
    59
    Join Date
    Oct 2007
    Posts
    124
    Thanks G/R
    0/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You won't find any useful info in the parent rotation.

    Maybe Zor can shed some light on this, I havn't taken a look at wow in months. And I don't know what kind of offsets it would use because I only really cared about the structure of the packets, not where they stored that data.

  10. #10
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    float __thiscall GetFacing(void* objectPtr) = vmt[14]
    Should be enough since you don't need to know pitch and roll for archaeology.

  11. #11
    gerardolm's Avatar Member
    Reputation
    -5
    Join Date
    Dec 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Mike View Post
    float __thiscall GetFacing(void* objectPtr) = vmt[14]
    Should be enough since you don't need to know pitch and roll for archaeology.
    CGObject_C::GetFacing always returns 0.0 (FLDZ, RET)
    CGObject_C::GetFacing_Override looks like a dynamic call:

    Code:
    CGObject_C__GetFacing_Override proc near
    mov     ecx, dword_D7F7F4
    mov     eax, [ecx]
    mov     edx, [eax+34h]
    jmp     edx
    CGObject_C__GetFacing_Override endp

  12. #12
    caytchen's Avatar Contributor
    Reputation
    138
    Join Date
    Apr 2007
    Posts
    162
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by gerardolm View Post
    CGObject_C::GetFacing always returns 0.0 (FLDZ, RET)
    What the hell captain obvious? There is a reason its a virtual function.

  13. #13
    gerardolm's Avatar Member
    Reputation
    -5
    Join Date
    Dec 2010
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by caytchen View Post
    What the hell captain obvious? There is a reason its a virtual function.
    Well, it could be a virtual function and still offer some generic behaviour for all objects (instead of just returning 0).

    Also, I have to ask that, if you have nothing to contribute, you should not post in this thread. Thanks.

  14. #14
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by gerardolm View Post
    Well, it could be a virtual function and still offer some generic behaviour for all objects (instead of just returning 0).

    Also, I have to ask that, if you have nothing to contribute, you should not post in this thread. Thanks.
    The behaviour IS generic for all object types, it returns the facing. The implementation however is not.

  15. #15
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

Page 1 of 2 12 LastLast

Similar Threads

  1. Trouble with World Building. All Objects disappear.
    By BanzBoyz77 in forum WoW ME Questions and Requests
    Replies: 5
    Last Post: 09-02-2010, 02:51 PM
  2. [General] Finding World Object Base & Size Offsets
    By Menlaben in forum WoW Memory Editing
    Replies: 8
    Last Post: 08-22-2010, 04:10 PM
  3. [QUESTION] World Objects and WMOs
    By Dilly in forum WoW ME Questions and Requests
    Replies: 7
    Last Post: 04-17-2010, 12:44 PM
  4. [Advice Request] Adding WMO's or other large objects to the world
    By ActivEcks in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 12-27-2008, 09:55 PM
  5. Object spacial orientation
    By Bobnovak in forum WoW Memory Editing
    Replies: 4
    Last Post: 07-01-2008, 05:09 PM
All times are GMT -5. The time now is 03:34 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search