Ticket #99 (closed defect: fixed)

Opened 7 years ago

Last modified 2 years ago

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:1 Changed 3 years ago by anonymous

  • Milestone Atlas Stage 2 deleted

Milestone Atlas Stage 2 deleted

comment:2 Changed 3 years ago by wacko

  • Milestone set to Backlog

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.

comment:4 Changed 2 years ago by Philip

  • Milestone changed from Backlog to Alpha 4
Note: See TracTickets for help on using tickets.