Closed autonomnom closed 8 years ago
a) didn't work but on the road i found some issues that might have added problems to it while testing this option b) this is problably the option i went for. kind of a fusion between b) and d) c) decided against to push the idea of a body that's more than a hollow d) see b)
Structure for now is..
Detection of obstacles is managed through 3 methods: a) A checking ray from the camera to the follow/identity.
b) Multiple raycasts spherical arranged with the camera as its origin for obstacles around the camera
c) An additional raycast backwards while the camera is zooming/moving to the identity to prevent jittering.
//
To get smooth camera movements while zooming in and out i have a method containing pretty mechanical if/else scenarios:
// It somehow works but doesn't feel right yet, it feels mechanical as well. I'm missing intelligent movement without even the slightest jittering. Ideas: a) Taking the distance and directions out of the raycasthit info, and adding them to the targetposition variable used to apply the changes. b) Cast more specific, environment-friendly, not clever spherical generated. This might make sense in this game, to a certain degree, but doesn't feel right as well. In the end it feels even more mechanical (i guess). c) Remove the rigibody and let the camera float through the body/environment. Might be irritating, atmosphere-breaking, but also interesting? There could be pictures and objects placed within the body, only to be found with the character/camera movement. Not easter-eggish, more like story-adding. Not sure how much this would collide with the story/gamedesign concept. d) Going deeper into the already-existing code and make it even finer. Maybe this will feel less mechanical or superior-mechanical like a crazy steampunkish vehicle. In case i stop dreaming of an a glowing liquid, warpspeed, magical solution..