Opened 14 years ago
Closed 13 years ago
#573 closed defect (fixed)
Camera does not reach top map border
Reported by: | frapell | Owned by: | |
---|---|---|---|
Priority: | If Time Permits | Milestone: | Alpha 4 |
Component: | Core engine | Keywords: | |
Cc: | Sergey, jayschwa | Patch: |
Description
If you do a full zoom, you're not able to get to the top of the map, you have to zoom out a little. And if you zoom in again, the camera will automatically move back.
I used 'top' here, instead of 'north' because if you rotate the camera, it happens on every border on top.
Change History (14)
comment:1 by , 14 years ago
Cc: | added |
---|
follow-up: 4 comment:2 by , 14 years ago
comment:3 by , 14 years ago
the camera shouldn't reach the very top border. It should reach the margin, which is set to 20.0f for each side. It means that the camera always will be inside the map and a user will always see the map. In the position near a side you should see the edge part of the map without any problems.
comment:4 by , 14 years ago
Replying to Jayschwa:
m->Zoom.Get[Smoothed]Value() does something really funky.
The absolute value of m->Zoom
is (confusingly) meaningless - only relative changes over time have any significance. (The idea was the camera typically shouldn't move up/down as you scroll over bumpy terrain, so there's no constant distance-from-camera-to-terrain value.)
Since most of our maps have players starting near an edge, and the constraints don't let you zoom in fully on the starting positions, I think it'd be good to tweak the constraints. I don't know exactly what should change, though.
comment:5 by , 14 years ago
Since most of our maps have players starting near an edge, and the constraints don't let you zoom in fully on the starting positions, I think it'd be good to tweak the constraints. I don't know exactly what should change, though.
I'll try to play with (zoom level & margin) binding. I think that the more zoom in the lesser margin should be.
comment:6 by , 14 years ago
I played around with some diff values for the constraints (if i'm correct, from L677 to L680) but couldn't get nothing.
I think the main problem is treating the margins as a 90º wall, when it should be more like a 30º, 40º, 50º, etc, depending on the camera angle.
What i mean by this, is that min and max margins should be a function that takes camera height and angle, and should return appropriate values.
Anyway, just shooting in the dark here, i'm not too familiar with the code yet :)
comment:7 by , 14 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:9 by , 14 years ago
Milestone: | → Backlog |
---|
comment:10 by , 14 years ago
Milestone: | Backlog → Alpha 3 |
---|
comment:11 by , 13 years ago
Milestone: | Alpha 3 → Alpha 4 |
---|
comment:12 by , 13 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:13 by , 13 years ago
Priority: | Nice to Have → If Time Permits |
---|
comment:14 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Camera pan constraints were added revision [8070] for ticket #554. Anyone who works on this might want to start there. The relevant bit is probably this section of code: http://trac.wildfiregames.com/browser/ps/trunk/source/graphics/GameView.cpp?rev=8070#L684
Intuitively, I thought this could be fixed by just using the current zoom level rather than the default zoom level, but m->Zoom.Get[Smoothed]Value() does something really funky.