SFML community forums

Bindings - other languages => DotNet => Topic started by: ichiman94 on May 05, 2012, 10:41:01 pm

Title: [SOLVED] RenderWindow.DefaultView.Center bug [SFML 2.0 RC]
Post by: ichiman94 on May 05, 2012, 10:41:01 pm
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
Title: Re: RenderWindow.DefaultView.Center bug [SFML 2.0 RC]
Post by: Laurent on May 06, 2012, 09:29:08 am
Do you call setView everytime the view changes?
Title: Re: RenderWindow.DefaultView.Center bug [SFML 2.0 RC]
Post by: ichiman94 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.
Title: Re: RenderWindow.DefaultView.Center bug [SFML 2.0 RC]
Post by: Laurent on May 06, 2012, 03:36:46 pm
Yes, in SFML 2 you need to.