How does GrabbingState prevent normal movement? And pushing blocks over ice?

Started by SteamPunkProgrammer, January 22, 2015, 09:54:11 PM

Previous topic - Next topic
Hello!

I've been picking apart the solarus engine for the better part of a week now, and there are two things that are bugging me, that I cant for the life of me figure out.

one, how does the GrabbingState prevent the player from moving horizontally, and thus screwing up the state when grabbing a block.
and two, how does movement over ice when pushing a block work, right now it seems like applying ground movement to the players movement would cause the block to move more then it should!

ah ha, I figured it out finally, atleast the grabbing state thing.

When PlayerMovementState calls stop, it clears the movement!