xparq / Out_of_Nothing

Versatile entity-based simulation & visualization/gamification framework PROTOTYPE
0 stars 0 forks source link

The View's Position ("offset") and Origin ("focus point") are still ill-defined and misused! #314

Open xparq opened 10 months ago

xparq commented 10 months ago

This shit has cost me hours of confusion! :-/

See (reconcile with) #221!!!

This is a lie:

Math::Vector2f offset = {0, 0}; // Position of the view (!!NOT YET: ... the view's focus point!!) in World coordinates

This is the truth instead:

Math::Vector2f offset = {0, 0}; // Position of the view in screen coordinates
xparq commented 10 months ago

Updated for now to this, hopefully better, until it's all sorted out:

Math::Vector2f offset = {0, 0}; // Displacement of the view relative to the initial implicit origin, in View (screen) coordinates
Math::Vector2f focus_offset = {0, 0}; // Pos. of a focus point in the view rect (in View coord.)
                                      // Used as the zoom origin etc. Usually set to the player's
                                      // on-screen pos, or some other interesting subject...