mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Snap player to terrain after loading to prevent spawning underground
This commit is contained in:
parent
dfc4008ec7
commit
0ae38a59c8
2 changed files with 5 additions and 1 deletions
|
|
@ -1586,7 +1586,6 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to,
|
|||
float triMaxZ = std::max({v0.z, v1.z, v2.z});
|
||||
float fromDist = glm::dot(localFrom - v0, normal);
|
||||
float toDist = glm::dot(localTo - v0, normal);
|
||||
bool towardWallMotion = (std::abs(toDist) + 1e-4f < std::abs(fromDist));
|
||||
|
||||
// Only collide with walls in player's vertical range
|
||||
if (triMaxZ < localFeetZ + 0.3f) continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue