Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

the problem is testability its just so much easier to test squared animations, but will test this code out at some point

scale.y = -1 

rotation = deg_to_rad(-180)

else:

#sprite.set_flip_h(false)

#%HitboxOni.scale.x = -1

#%Hurtbox.scale.x = 1

scale.y = 1 

rotation = deg_to_rad(0)

(1 edit)

I’m no expert but you could do one of these:

  • use marker2D node as an anchor by placing it to the place where you need it and flip the sprite around that point using marker2D node
  • use node2d as parent of the sprite and an anchor and have the point where you need it and flip the sprite around that point
  • use offset.x and do some little math (sprite width/number where point you desire is) and have the point where you want it - some testing is required

my personal favorite is the marker2D method as it’s easiest and you can do with it what you want it’s often used placed on weapon sprites to have origin for the projectiles (asteroids for example)

(1 edit)

i used to use just the flip feature built into godot  aka sprite.set_flip_h(true) but alot of my character bodies has adopted

scale.y = -1 

rotation = deg_to_rad(-180)

else:

scale.y = 1 

rotation = deg_to_rad(0)

i just havnt used it on uncentred animation, but sprite.set_flip_h(true)  doesnt care for offsets or pivot points because it just flips the sprite, will have a play around with your method. im not very good coding or doing game dev, its just a hobby i take enjoyment in,
my salty attitude is only becasue i was waiting for an asset like this one. and want to use it in my never to be released project lol