PanosK92 / SpartanEngine

A game engine with an emphasis on real-time cutting-edge solutions
https://panoskarabelas.com
MIT License
2.24k stars 189 forks source link

Stair navigation in the Doom default world with the physics-based camera #127

Open PanosK92 opened 11 months ago

PanosK92 commented 11 months ago

The recent update to the Doom default world in our game engine introduces physics-based interactions for all meshes, enhancing the physics/capsule-based camera's dynamic navigation. However, stair navigation remains a challenge, with players currently using the spacebar to jump over them. A possible approach to achieving smoother, more natural stair traversal is implementing a raycasting method, taking advantage of the physics-enabled environment to allow the camera to seamlessly adapt to stair geometry.

Example 1: Screenshot 2023-12-01 151457

Example 2: Screenshot 2023-12-01 151433

Source: https://github.com/PanosK92/SpartanEngine/blob/62d215a29465d0d70c88535b0d6c261a181613ba/runtime/World/Components/Camera.cpp#L346