GameMaker What's the difference between middle centre and bottom centre sprite origin in platformer game?

MartinK12

Member
In many tutorials I see people using middle centre or bottom centre as origin for sprites (I’m interested in y axis).

The only thing I can see different is when setting bottom origin it's easier to make all those squashy animations, ie. when landing on ground change yscale - which is not possible when sprite origin is in the centre.

But are there other differences I'm not aware of when centre or bottom makes a difference in platformer game?

Thank You :)
 

johnwo

Member
As you mention, image_yscale and image_angle use the origin as transform/pivot point.
If Y-axis origin is equal to sprite_height, then if you have to do a collision check for a point below the sprite (not using bounding-box), you could just check y+1, albeit this sort of unnecessary imo.
Spawning particles for footstep dust etc. is easier, as you don't have to write out stuff like dust.y = y+(sprite_height/2);, but much like the statement above, it's sort of unnecessary.

I think it comes down to flavor and what you are used to doing, as you can have the origin set to [0,0] and still do anything you can do without setting the origin elsewhere, but it make take some more effort in some cases...
 
Top