Ticket #99 (closed defect: fixed)
Objects jump when first moved
| Reported by: | Philip | Owned by: | |
|---|---|---|---|
| Priority: | Nice to Have | Milestone: | Alpha 4 |
| Component: | Core engine | Keywords: | |
| Cc: |
Description
Create an object in Atlas. Zoom in and move the camera so the object is near a corner of the screen. With the object-move tool, click the unit and try moving by a single pixel. It jumps towards the edge of the screen by dozens of pixels.
It seems the cause is that CCamera::GetScreenCoordinates and CCamera::GetWorldCoordinates are not exact inverses - for points near the edge of the screen, the difference is quite significant. (GetWorldCoordinates requires integer pixel values, but I don't think that'd cause errors of more than one screen-space pixel (which would be acceptable) - it's probably some difference in the algorithms used to convert between spaces.)
Change History
comment:3 Changed 2 years ago by philip
- Status changed from new to closed
- Resolution set to fixed
(In [8870]) Fix perspective calculation in CCamera::GetScreenCoordinates?. Fixes #99.

Milestone Atlas Stage 2 deleted