Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Basic XNA question with sprite origins  (Read 950 times)

0 Members and 1 Guest are viewing this topic.
Basic XNA question with sprite origins
« on: December 21, 2008, 04:55:32 pm »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
With Game Maker and MMF2 you can set the origins of a sprite(or hotspot as in MMF2).
So instead of the sprite being 0,0  with it's origins, you can change them to 8,8 if you want it centered.

Does XNA only use the 0,0 spots on a sprite when it draws it or can you set an origin to like the center of the sprite?
Logged
  • Super Fan Gamers!
Re: Basic XNA question with sprite origins
« Reply #1 on: December 21, 2008, 05:19:58 pm »
  • MetalRidley was here
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 235
It defaults to 0,0 but you can set the origin with a Vector2 when you call SpriteBatch.Draw(). It will also use that origin if you do any rotations.
Logged



THE MUSIC IS REVERSIBLE, BUT TIME IS NOT. TURN BACK... turn back... turn back...
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.048 seconds with 42 queries.

anything