-
Member
Line Of Sight
There's been a few line of sight threads over the years.
There's a general consensus that it all happens server side, and that there's no dynamic public "solution" to proper line of sight irregardless of player race and target "size" when using TraceLine.
Most solutions I've seen are a Z axis on both units inflated by 1.8 to 2.0.
However I haven't found a recent thread on this, so I figured I'd check with you guys.
Has anyone actually figured out a good dynamic LoS calculation for the Z axis when using TraceLine that works for all races?
-
Member
Did you tried z+ObjectPointer.Height offset?
-
Established Member
-
Post Thanks / Like - 1 Thanks
MrNoble (1 members gave Thanks to oiramario for this useful post)
-
Member
Originally Posted by
Borg333
Did you tried z+ObjectPointer.Height offset?
Indeed, however this doesn't seem to be accurate at all.
-
Member
Originally Posted by
Snoogens
Indeed, however this doesn't seem to be accurate at all.
add 1.5 to each Z coordinate. It works ok. Then check for error message when needed?
-
Member
There's been a few line of sight threads over the years.
There's a general consensus that it all happens server side, and that there's no dynamic public "solution" to proper line of sight irregardless of player race and target "size" when using TraceLine.
Most solutions I've seen are a Z axis on both units inflated by 1.8 to 2.0.
However I haven't found a recent thread on this, so I figured I'd check with you guys.
Has anyone actually figured out a good dynamic LoS calculation for the Z axis when using TraceLine that works for all races?
I have same issue.
Last edited by Adelaclicksud; 10-22-2022 at 08:30 AM.
-
Established Member
I doubt that you have not found the correct offset, or even tested it yourself.
Find an obstacle and a target about your height, and test your ray collision offset.xx.jpg
-
Member
Originally Posted by
hjalplos
add 1.5 to each Z coordinate. It works ok. Then check for error message when needed?
lol, the entire point of the thread is to avoid a static.
-
Member
Originally Posted by
oiramario
I doubt that you have not found the correct offset, or even tested it yourself.
Find an obstacle and a target about your height, and test your ray collision offset.
xx.jpg
I have, and it simply isn't accurate for all situations and races, PVP and PVE. I know TrinityCore uses this for instance, and it's simply not accurate.
-
Established Member
The calculation amount of ray trace is very heavy. It is impossible and unnecessary to calculate on the server side.
const uint64_t WorldIntersect = 0xF160F0;
-
Post Thanks / Like - 1 Thanks
ChrisIsMe (1 members gave Thanks to oiramario for this useful post)
-
Contributor
Last edited by ChrisIsMe; 11-01-2023 at 04:57 PM.
no war
-
Member
Originally Posted by
ChrisIsMe
Real and true.
Blizzard (Amongst many other games) have never used server side collision in just about all of their games..
There's even 'community' modified games and additions to games that do not do this, think of things like FACEIT
Trinity Core has a pretty terrible and bad implementation of server side LOS checks and I do not know where they got the idea to even implement it because the game already takes care of it.
TrinityCore/Object.cpp at master . TrinityCore/TrinityCore . GitHub
Well the server doesn't run any WoW Client so monsters (server side) needs this?
-
Active Member
I think the client uses the traceline everywhere, the client side Los check also uses traceline, just need to find a correct flag combination?
-
Contributor
What I do is multiply the units height by the effective scale, and modified scale (if they're > 1.0 or <) and add that to the z axis. Seems pretty good, and works well on bosses that fail if you did just height + z (like the dragon dude for example in MoP, first thing that came to mind). The height read in the main object struct is just the model height, and since some models are scaled larger or smaller, you multiple the model height by their effective scale (for example the training dummies in the cities, they all share the same height, but are obviously different). So, since you have the object already since you're getting it's X/Y/Z you can get the other values you need.
I play on retail only, but did WoTLK classic when it hit. The model height is at 0x5C on retail, and was at 0x9C on WoTLK classic when I checked there last (shortly after launch). The modified scale is the scale applied when the object has temporary applied size changing modifiers.
Up to you now to find those effective and modified scales
Last edited by scizzydo; 11-30-2022 at 09:15 PM.