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

Author Topic: [SOLVED] RenderWindow.DefaultView.Center bug [SFML 2.0 RC]  (Read 2845 times)

0 Members and 2 Guests are viewing this topic.

ichiman94

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hello everyone, thanks for the framework, it's so good and lightweight that I'm developing some prototypes, and I've found a bug related to Views, so if I set the Center of the View to the Player's position, the value of View.Center changes as much as I move, but the entire screen doesn't move.

Even I tried using RenderWindow.DefaultView.Move, but that didn't work too.

And right, I'm using the RenderWindow's DefaultView, tried out GetView too, but the screen doesn't move.

Hope it helps finding the bug.

EDIT: As Laurent said, when you change the View's position, you need to do RenderWindow.setView() everytime

Sorry for the trouble
« Last Edit: May 06, 2012, 06:43:52 pm by ichiman94 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: RenderWindow.DefaultView.Center bug [SFML 2.0 RC]
« Reply #1 on: May 06, 2012, 09:29:08 am »
Do you call setView everytime the view changes?
Laurent Gomila - SFML developer

ichiman94

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: RenderWindow.DefaultView.Center bug [SFML 2.0 RC]
« Reply #2 on: May 06, 2012, 11:37:58 am »
No. Do I have to?

If yes, then sorry for that, in 1.6 I didn't have to set the View to make it work.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: RenderWindow.DefaultView.Center bug [SFML 2.0 RC]
« Reply #3 on: May 06, 2012, 03:36:46 pm »
Yes, in SFML 2 you need to.
Laurent Gomila - SFML developer

 

anything