Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goBack command using deltas and not old locations #8

Open
Gankra opened this issue Oct 26, 2012 · 0 comments
Open

goBack command using deltas and not old locations #8

Gankra opened this issue Oct 26, 2012 · 0 comments

Comments

@Gankra
Copy link
Member

Gankra commented Oct 26, 2012

Originally goBack looked at which way a Character was facing and simply had them move in the opposite direction. With the addition of diagonal movement this became insufficient.

goBack currently only permits one "step" in that it moves the Character back to its last known position, regardless of what might now be there.

If instead the Character stored its last known delta, goBack could be called several times to move the character "further" back. Hit checking could also be re-added to this behaviour.

As it stands goBack's desired use only really requires one "step", as it's intended to get a Character out of a hitbox it just entered. If we wanted to also perform hit checking to ensure they're not now moving into an invalid location (highly recommended if it will be called multiple times), we would have to store the "raw" pre-motionMapping delta, or perform an inverseMotionMapping to the delta they stored so that when the motionMap was factored in they actually end up where they were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant