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

Author Topic: Camera on Sprite  (Read 1092 times)

0 Members and 1 Guest are viewing this topic.

player931402

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Camera on Sprite
« on: September 21, 2011, 08:02:03 pm »
Hi guys.

2 week ago i and 4 my friend started to create a RPG.

We have created many classes ( Principal player,Enemy(with a less AI),NPC, fight  ecc. ecc.)

But we have a problem. Any1 can illistrate us a code for:
 " camera follow the sprite" ? ( == sprite always at center of the window )




any suggest?

ty and sry for my bad eng!

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Camera on Sprite
« Reply #1 on: September 21, 2011, 08:52:09 pm »
You can use a sf::View and set its position according to the sprite's position. You get more information in the tutorials and the documentation.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: