#How to limit sliding to one direction

8 messages · Page 1 of 1 (latest)

dreamy steppe
#

I want the player to be able to slide in only the direction they are facing for a certain time period, but i also want them to be able to look around while sliding, and when the slide is over, to be facing the direction they are looking. How would I do that?

lusty garnet
#

You likely have code that flips the player when they move/face the opposite direction. It should be possible to disable that code if the player is sliding.

dreamy steppe
#

Like the code that rotates the camera with the player? If I turn it off while sliding and then after the slide I turn it back on would that work?

lusty garnet
#

I don't know what your code is like, but something along those lines should work

#

Or stopping the player's velocity from changing normally when sliding

#

Either or

#

Depends of course on how your system is set up

dreamy steppe
#

yeah, ill try and see if i can get that to work