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

Author Topic: Sprite.setOffest causes compiler error  (Read 1081 times)

0 Members and 1 Guest are viewing this topic.

jerryd

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Sprite.setOffest causes compiler error
« on: April 23, 2013, 05:13:42 am »
SFML forum,

 SFML 1.6,  Visual C++ Express 2010

 I've searched this forum for posts on this subject but
 none of them answer my question.

 I want to relocate the x/y origin of a sprite for rotation.

 I've seen example programs that uses code like:
 Sprite.setOrigin(100, 100);

 But if I try to use this I get a compiler error that says:
 error C2039: 'setOrigin' : is not a member of 'sf::Sprite'

 This command exists in the sf::Sprite Class Reference so
 I'm confused and stuck?

jerryd

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Sprite.setOffest causes compiler error
« Reply #1 on: April 23, 2013, 07:08:48 am »
You should be using SFML 2, which uses camelCase for the functions. In SFML 1.6 it's SetOrigin.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/