WASD Arrows and Space keys X to toggle shadows Use Turbowarp for less lag: https://turbowarp.org/684769717?fps=60&hqpen&stuck
There are now two variants of the shadow algorithm. One is the original, the other is an improved and faster version. The faster version is less compatible with the painter's algorithm only sort, but works nearly flawlessly with BSP. Since I'm pretty sure this specific shadow volume algorithm is original and has not been implemented before, I will give it the name "cookie-cutter shadowing". I think real-time shadowing may be a bit too slow on Scratch... CREDITS: The improved BSP(binary space partitioning) algorithm uses a triangle cutting method by @Vadik1. The code itself is slightly based off of their code, except it is pretty much original. You can find and compare their code here: https://scratch.mit.edu/projects/277701036/editor/ The Bezier code for camera paths is (almost) directly taken from @gtoal's project: https://scratch.mit.edu/projects/131769048/ Quaternion look-at code from Unity forums. Compare with @ggenije's code: https://scratch.mit.edu/projects/470670022/ Much of the collision detection-response code comes from: https://wickedengine.net/2020/04/26/capsule-collision-detection/ Quaternion swing-twist decomposition code and derivation come from: http://www.euclideanspace.com/maths/geometry/rotations/for/decomposition/index.htm Song is "Wait" by C418