It’s well known, there’re problems with the camera. Some are a bit annoying, others are really frustrating (Full discussion about camera problems). I’d like to address the zoom-on-camera-collision issue, which is way too present and makes combats and puzzles difficult.
Camera zooms when it collides with the ground
The zoom isn’t the real problem, it’s that you only see the back of you character or a giant asura head.You want to look at the environment but the game shows you your character.
I suggest a dynamic camera aiming point:
- When the player manually zooms in, he/she usually wants to look his/her character. -> At closest zoom, the camera should be centered on the character.
- When the player manually zooms out, he/she usually wants to look at the environment -> At furthest zoom, the camera should be centered above+behind the character’s head.
- On automatic zoom, the aiming point wouldn’t change. The camera would still be centered on the point decided by the player.
Ex (attachments 1 and 2): I want to look at this beautiful statue but the camera zooms on collision with the ground. Current mechanism (attachment 1): the screen is centered on the back of the character. Suggestion (attachment 2): the screen is centered above the character’s head.
Camera zooms when smalls objects are in the way & base algorithm for zooming
When the character goes behind a small obstacle, like a small tree, the camera goes nuts. It’s VERY annoying in combat and puzzles. The game should only move the camera when the position of the character becomes unclear. Right now, the game zooms in when an obstacle is too close (yeah, not because it hides you, but because IT IS TOO CLOSE!). It feels like the algorithm is:
- Launch rays from the character hitbox to the camera hitbox (camera hitbox -> min distance camera-walls).
- If a ray collides, then move the camera to the collision point.
And the zooming triggers too often, even when the character position is clear to the player.
The best approach would probably be: check whether the collision is caused by a wall or by a decoration, then move the camera ONLY on wall collisions. But that can be difficult/time consuming to implement depending on data structures.
For now, I suggest reusing the existing outline mechanic (which appears when the cursor is above something):
- If the camera collides with something, then move it (preserve the min distance camera-walls).
- Try to draw the outline of the player (but don’t display it).
- If at least x pixels can be drawn, then do nothing.
- Else use the old algorithm on the ray from the center of the player to the center of the camera (we know this ray collides with something).
That should do the trick in most situations.
Ex (Attachment 3): I moved my character behind that golem. I obviously know where I am. Hidden part of the outline = white, draw-able part of the outline = blue.
Don’t move camera on invisible walls
Why does it?
(edited by Zutroy.9105)