Opened 18 years ago

Closed 13 years ago

Last modified 13 years ago

#99 closed defect (fixed)

Objects jump when first moved

Reported by: Philip Taylor Owned by:
Priority: Nice to Have Milestone: Alpha 4
Component: Core engine Keywords:
Cc: Patch:

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 (4)

comment:1 by (none), 14 years ago

Milestone: Atlas Stage 2

Milestone Atlas Stage 2 deleted

comment:2 by Andrew, 14 years ago

Milestone: Backlog

comment:3 by philip, 13 years ago

Resolution: fixed
Status: newclosed

(In [8870]) Fix perspective calculation in CCamera::GetScreenCoordinates. Fixes #99.

comment:4 by Philip Taylor, 13 years ago

Milestone: BacklogAlpha 4
Note: See TracTickets for help on using tickets.