cavePos.z and cavePos.y are swapped, leading to caves that generate extending vertically instead of horizontally.

b3spectacled 2020-10-19 00:25:42 -07:00
parent 02c1c452a9
commit f8d6027297

@ -110,8 +110,8 @@ Let caveRadius be randomFloat() * randomFloat()
for len in caveLength {
set cavePos.x to previous value + sin(theta) * cos(phi)
set cavePos.y to previous value + cos(theta) * cos(phi)
set cavePos.z to previous value + sin(phi)
set cavePos.z to previous value + cos(theta) * cos(phi)
set cavePos.y to previous value + sin(phi)
set theta to previous value + deltaTheta * 0.2
set deltaTheta to (previous value * 0.9) + randomFloat() - randomFloat()