Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Is there a way to get the current view's camera position? (The float rect data)  (Read 3167 times)

0 Members and 1 Guest are viewing this topic.

Lamonte

  • Newbie
  • *
  • Posts: 46
    • View Profile
Wonder if there's a way to get the current float rect data for later calculations (for move checks)

            //load current camera view
            View view = new View(new FloatRect(0, 200, width, height));

Or should I create a class that manages this data?

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Do you mean the bounds for your view? If so it is not possible, but it has been suggested here.
If you mean the view's actual position use the center of the view.
« Last Edit: September 04, 2013, 06:12:05 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Lamonte

  • Newbie
  • *
  • Posts: 46
    • View Profile
Do you mean the bounds for your view? If so it is not possible, but it has been suggested here.
If you mean the views actual position use the center of the view.

yeah, I guess I'll write my own class for the sole purpose of what I'm trying to accomplish as the camera won't rotate.  Thanks for the information.

 

anything