Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

CHANGE ORIGIN OF A SPRITE

Hi...

i wanted to ask, if there´s a way to change the origin of a Sprite to "centered"..

i need it to let a Sprite rotate by his own center ( like a wheel )...
I need it for a SPrite.. NOT A PICTURE...

Thisis really important...  HOPE SOMEONE CAN HELP ME :shock:
 

arev

Sponsor

You need to set ox and oy parameters to halved values of width and height of the sprite. So, if the @sprite is 100 pixels wide, and 200 pixels high, you should do it like this:
@sprite.ox = 50
@sprite.oy = 100
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top