Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Also, what do you think we should use as the sphere radius? Player's CollisionRadius (which is 0.75

[DiscordArchive] Also, what do you think we should use as the sphere radius? Player's CollisionRadius (which is 0.75

[DiscordArchive] Also, what do you think we should use as the sphere radius? Player's CollisionRadius (which is 0.75

rektbyfaith
Administrator
0
02-23-2025, 06:30 PM
#1
Archived author: walkline • Posted: 2025-02-23T18:30:46.429000+00:00
Original source

Also, what do you think we should use as the sphere radius? Player's CollisionRadius (which is 0.75 for undead)?
rektbyfaith
02-23-2025, 06:30 PM #1

Archived author: walkline • Posted: 2025-02-23T18:30:46.429000+00:00
Original source

Also, what do you think we should use as the sphere radius? Player's CollisionRadius (which is 0.75 for undead)?

rektbyfaith
Administrator
0
02-23-2025, 06:45 PM
#2
Archived author: Pursche • Posted: 2025-02-23T18:45:36.899000+00:00
Original source

You would have to do the full position, not just the height. If there's something clipping into you from the side you want to push the player out from that wall.

In the case above, there's a somewhat simple fix to the algorithm, but really implement this first and make sure this works.
rektbyfaith
02-23-2025, 06:45 PM #2

Archived author: Pursche • Posted: 2025-02-23T18:45:36.899000+00:00
Original source

You would have to do the full position, not just the height. If there's something clipping into you from the side you want to push the player out from that wall.

In the case above, there's a somewhat simple fix to the algorithm, but really implement this first and make sure this works.

rektbyfaith
Administrator
0
02-23-2025, 06:54 PM
#3
Archived author: walkline • Posted: 2025-02-23T18:54:50.309000+00:00
Original source

I implemented it. I mean, it's not ready for a PR, but the calculations are in place, and the final position for Blink is calculated using this algorithm. As I mentioned, in about 30% of cases, Blink leads to falling through the ground. It falls through because of this bottom-to-top collision direction.
rektbyfaith
02-23-2025, 06:54 PM #3

Archived author: walkline • Posted: 2025-02-23T18:54:50.309000+00:00
Original source

I implemented it. I mean, it's not ready for a PR, but the calculations are in place, and the final position for Blink is calculated using this algorithm. As I mentioned, in about 30% of cases, Blink leads to falling through the ground. It falls through because of this bottom-to-top collision direction.

rektbyfaith
Administrator
0
02-23-2025, 07:04 PM
#4
Archived author: walkline • Posted: 2025-02-23T19:04:53.683000+00:00
Original source

Offset to the rescue: `auto safeGroundPos = map->GetAccurateHeight(destx, desty, destz+GROUND_HEIGHT_TOLERANCE, m_caster->GetCollisionRadius());` Now it seems to work well
rektbyfaith
02-23-2025, 07:04 PM #4

Archived author: walkline • Posted: 2025-02-23T19:04:53.683000+00:00
Original source

Offset to the rescue: `auto safeGroundPos = map->GetAccurateHeight(destx, desty, destz+GROUND_HEIGHT_TOLERANCE, m_caster->GetCollisionRadius());` Now it seems to work well

rektbyfaith
Administrator
0
02-23-2025, 08:01 PM
#5
Archived author: Pursche • Posted: 2025-02-23T20:01:36.617000+00:00
Original source

{destx, desty, destz} is supposed to be the position at the feet right? With this you're basically making a sphere whose center is at the position of the feet, but we want it to end at the feet. So try destz+radius instead of the height offset.
rektbyfaith
02-23-2025, 08:01 PM #5

Archived author: Pursche • Posted: 2025-02-23T20:01:36.617000+00:00
Original source

{destx, desty, destz} is supposed to be the position at the feet right? With this you're basically making a sphere whose center is at the position of the feet, but we want it to end at the feet. So try destz+radius instead of the height offset.

rektbyfaith
Administrator
0
02-23-2025, 08:03 PM
#6
Archived author: Pursche • Posted: 2025-02-23T20:03:35.409000+00:00
Original source

The red position is {destx, desty, destz}, red is the sphere you make. Blue is the sphere you'll make if you add radius to destz.
[Image: image.png?ex=690c5657&is=690b04d7&hm=704...c85509e70&]
rektbyfaith
02-23-2025, 08:03 PM #6

Archived author: Pursche • Posted: 2025-02-23T20:03:35.409000+00:00
Original source

The red position is {destx, desty, destz}, red is the sphere you make. Blue is the sphere you'll make if you add radius to destz.
[Image: image.png?ex=690c5657&is=690b04d7&hm=704...c85509e70&]

rektbyfaith
Administrator
0
02-23-2025, 08:04 PM
#7
Archived author: Pursche • Posted: 2025-02-23T20:04:09.785000+00:00
Original source

Also I think the collision radius can be a bit smaller than the players collision radius
rektbyfaith
02-23-2025, 08:04 PM #7

Archived author: Pursche • Posted: 2025-02-23T20:04:09.785000+00:00
Original source

Also I think the collision radius can be a bit smaller than the players collision radius

rektbyfaith
Administrator
0
02-23-2025, 08:04 PM
#8
Archived author: walkline • Posted: 2025-02-23T20:04:52.393000+00:00
Original source

Alright, will do. Another issue
example.mp4
rektbyfaith
02-23-2025, 08:04 PM #8

Archived author: walkline • Posted: 2025-02-23T20:04:52.393000+00:00
Original source

Alright, will do. Another issue
example.mp4

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)