Hey again. I've been toying with ideas and let me explain my ideas:
Basically, I have a tile with a property of Water and when the player enters it, I want him to change to a swimming state. Basically, for the movement I setup a variable called Environment and then that uses pointer on whether to use GroundMovement or WaterMovement during the control read.
But the main problem I seem to have is coming up with a good way on how to make the transition from air to water. Right now it's kind of messy in that it looks at what tile you moved into and then sets Environment based on that. It's also possible when you briefly swim up to exit water, but move back down you'll be considered in air for a moment while in a water tile.
So, my thought process was to eliminate the whole "check what you moved into" and replace it with some check at the beginning to see what kind of tile you are mostly overlapping...
Does this sound reasonable or is it overcomplicating yet again?
Basically, I have a tile with a property of Water and when the player enters it, I want him to change to a swimming state. Basically, for the movement I setup a variable called Environment and then that uses pointer on whether to use GroundMovement or WaterMovement during the control read.
But the main problem I seem to have is coming up with a good way on how to make the transition from air to water. Right now it's kind of messy in that it looks at what tile you moved into and then sets Environment based on that. It's also possible when you briefly swim up to exit water, but move back down you'll be considered in air for a moment while in a water tile.
So, my thought process was to eliminate the whole "check what you moved into" and replace it with some check at the beginning to see what kind of tile you are mostly overlapping...
Does this sound reasonable or is it overcomplicating yet again?