[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
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)?
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.
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.
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
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.
![[Image: image.png?ex=690c5657&is=690b04d7&hm=704...c85509e70&]](https://cdn.discordapp.com/attachments/284323424032129024/1343312323347222559/image.png?ex=690c5657&is=690b04d7&hm=70404d1db8e46b5b9a4b90f926d0ef6519784897d6efff7d662df35c85509e70&)
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&]](https://cdn.discordapp.com/attachments/284323424032129024/1343312323347222559/image.png?ex=690c5657&is=690b04d7&hm=70404d1db8e46b5b9a4b90f926d0ef6519784897d6efff7d662df35c85509e70&)
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
Archived author: walkline • Posted: 2025-02-23T20:04:52.393000+00:00
Original source
Alright, will do. Another issue
example.mp4