LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Frictionless Ice.

Root / Programming Questions / [.]

Z_E_R_OCreated:
How would I make frictionless ice? Like in the Legend Of Zelda's dungeons.

How would I make frictionless ice? Like in the Legend Of Zelda's dungeons.
Meaning that the player continues to travel and cannot change directions until they are stopped?

Umm... More like when you stop you continue to slide on the ice for a few seconds.

Sorry I could have been a tad more descriptive...

Give the player an X and Y velocity, which then is added onto the X and Y coordinates every loop. When you stop moving, rather than immediately setting the velocity to 0, have it subtracted by a "friction" variable every loop until it's 0. So when you let go of the control stick, you won't immediately stop in place, but will slide a bit. Turn the friction down to slide further, turn it off and you will slide forever.

@amihart thanks a lot!!!! I'm gonna work on it in a few.

It works thank you