My pleasure… good to hear you are rolling. Welcome to the forum, too.
Technically/Actually, gravity only affects the camera after first-move. @Deltakosh is the one who taught me about this line 17 feature, but he didn’t quite understand your problem. i didn’t understand either, but I guessed. I have used line 17 on 3 personal projects, and have passed-it-on to other users… about 5 times. It is my friend.
I think camera gravity and checkCollisions things… are part of a “special” collisions system designed-for “first-person shooter” games. It is primarily-for freeCamera-to-mesh collisions, but SOME have tried using it for mesh-to-mesh collisions, via the mesh.moveWithCollisions() feature.
A little hint… avoid camera-colliding with low-height things. If your camera hits a low-height obstacle, and you keep pushing “w” more… the camera will try to climb-over the low-height obstacle (due-to the ellipsoid shape of the invisible colliders), but gravity will keep pulling the camera back to the ground. This makes the camera stutter/jiggle with continued/held-down “w” key-pressings.
A collisions-active freeCamera can/will also “scrub-off” the sides of round-sided things… such as cylinders/poles. This is made this way… so that if camera hits a wall at an angle… and user keeps moving forward, the camera will slide-along the wall. The amount of camera-mesh collision “offset-angle” needed… to make a held-“w” camera slide-along/scrub-off an obstacle… is user-adjustable.
engine.collisionsEpsilon = 0.001;
This setting also affects “climb-over”, so if you MUST have low-height obstacles, you might wish to adjust that value… to avoid the freeCamera climb-VS-gravity jitters… mentioned earlier.
Also, if you see the obstacle start disappearing when camera is REAL CLOSE, set camera.minZ to a low number… such as .01 or smaller.
Do you know how to mark someone’s reply as… “the solve”? If you do that, it helps the forum helpers.
Party on! Winona MN, eh? That’s near “apple country”, isn’t it? Love that hilly area! I use-to climb similar St. Croix River bluffs around Taylors Falls - too fun. I lived in Mpls for… 18 years. The band I played bass-in… use to play in St. Charles, sometimes. Good times. You guys are PARTY ANIMALS!