Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Sf::View and How can i fix things on display?
Print
Pages: [
1
]
Author
Topic: Sf::View and How can i fix things on display? (Read 1448 times)
0 Members and 1 Guest are viewing this topic.
Jan666
Jr. Member
Posts: 64
Sf::View and How can i fix things on display?
«
on:
May 22, 2022, 08:06:09 am »
Hi,
I try to make 2d sidescroller with Touch on mobilephone. I used sf::View to follow my Player, and it works. But i have also 3 Buttons on display they move away. How can i fix them on display?
Logged
G.
Hero Member
Posts: 1593
Re: Sf::View and How can i fix things on display?
«
Reply #1 on:
May 22, 2022, 10:03:07 am »
Draw them on another view that doesn't move.
window.
setView
(
scrollableView
)
;
// draw your gameplay here
window.
setView
(
fixedView
)
;
// draw your user interface here
Logged
Jan666
Jr. Member
Posts: 64
Re: Sf::View and How can i fix things on display?
«
Reply #2 on:
May 22, 2022, 09:23:21 pm »
Thanks do your answer. Is there any parenting function between player and playercam(view)? When my player stop at a wall the playercam dont!
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Sf::View and How can i fix things on display?
anything