How to get Unit's Height and Radius(combat reach?) menu

User Tag List

Results 1 to 5 of 5
  1. #1
    singed420's Avatar Member
    Reputation
    5
    Join Date
    Jan 2018
    Posts
    23
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get Unit's Height and Radius(combat reach?)

    After couple months study , finally I get my unlocker done as well as unlocked in game guid for wow native api to interact with.Thanks for all ownedcorers that replys.
    Now I got a new problem, which is how to get a Unit's Height and Radius for combat reach? I searched a bit in forum but only saw couple ppl mentioned about object's height offset without any info about how to find it.

    I also wonder how the game calculates distance when casting spell to target, is it calculate from player's model center position to target's model center postion, or is it from player's model edge( player's center+player radius) to target's model edge( target's center+target radius)? Cause when using C_Spell.IsSpellInRange to check if spell is in range, most of time when it just get enough distance to return true, it still failed to cast the spell because of not enough distance.

    How to get Unit's Height and Radius(combat reach?)
  2. #2
    scizzydo's Avatar Established Member
    Reputation
    193
    Join Date
    Oct 2019
    Posts
    129
    Thanks G/R
    5/86
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by singed420 View Post
    After couple months study , finally I get my unlocker done as well as unlocked in game guid for wow native api to interact with.Thanks for all ownedcorers that replys.
    Now I got a new problem, which is how to get a Unit's Height and Radius for combat reach? I searched a bit in forum but only saw couple ppl mentioned about object's height offset without any info about how to find it.

    I also wonder how the game calculates distance when casting spell to target, is it calculate from player's model center position to target's model center postion, or is it from player's model edge( player's center+player radius) to target's model edge( target's center+target radius)? Cause when using C_Spell.IsSpellInRange to check if spell is in range, most of time when it just get enough distance to return true, it still failed to cast the spell because of not enough distance.
    I usually use UnitDetailedThreatSituation to find a few offsets. Combat reach is in there (amongst other lua functions, just the one I go to because of it having quite a few different offsets). Height I don't know a lua one for you, I just know most common models heights thanks to the databases out there and can find it quickly on the CGObject_C, as it's a small struct. The thing with height though is you also need to apply the model scales from the object display struct.

    Lastly, if you reverse the IsSpellInRange, it's way more to it than just distances and the combat reach/bounding radius.

  3. #3
    gdfsxwy's Avatar Active Member
    Reputation
    18
    Join Date
    Apr 2010
    Posts
    47
    Thanks G/R
    25/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use the Z-difference between the coordinates under my feet and above my head to obtain the height. AI can provide the closest method between two straight lines, which is the shortest distance between two targets.

  4. #4
    scizzydo's Avatar Established Member
    Reputation
    193
    Join Date
    Oct 2019
    Posts
    129
    Thanks G/R
    5/86
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by gdfsxwy View Post
    I use the Z-difference between the coordinates under my feet and above my head to obtain the height. AI can provide the closest method between two straight lines, which is the shortest distance between two targets.
    I quit wow a while ago, so not staying fully up to date with changes, you can call the CGUnitDisplay::GetAttachmentPosition with index 18 (most acurate), or use the height *= scales from CGObjectDisplay + (0x50, 0x58, 0x60). Those are the scales that get applied to the units bounding radius (which is factored in the struct with them)

  5. #5
    gdfsxwy's Avatar Active Member
    Reputation
    18
    Join Date
    Apr 2010
    Posts
    47
    Thanks G/R
    25/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by scizzydo View Post
    I quit wow a while ago, so not staying fully up to date with changes, you can call the CGUnitDisplay::GetAttachmentPosition with index 18 (most acurate), or use the height *= scales from CGObjectDisplay + (0x50, 0x58, 0x60). Those are the scales that get applied to the units bounding radius (which is factored in the struct with them)
    Thank you very much for your response, Scizzydo. Although I joined the forum early on, I didn't have much time to research it due to work reasons. I am currently recovering from heart disease and have time to improve my cheating tools. I don't understand CGUnitDisplay, index 18, Concepts such as boundary radius and proportion. I have reversed the UnitDetailedThreatSituation and IsSpellInRange to know the combat radius. Please indicate where I am going to study, or point out the clues in the current version of IDA. Research is my only pleasure now. Thank you.
    Last edited by gdfsxwy; 12-31-2024 at 12:24 AM.

Similar Threads

  1. Replies: 8
    Last Post: 07-11-2008, 08:14 PM
  2. Replies: 0
    Last Post: 04-25-2008, 01:50 AM
All times are GMT -5. The time now is 02:42 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