How do i make my 2d character teleport?,How do i create a Teleport movment for a 2d character?
Hello, i am working on my first 2d platformer game and i was wondering how to add an input that teleport the character in the direction it is facing based on how long the teleport input (ex:spacebar) was hold for. Also i would like to add an animation on button release when the teleport happens + a cooldown after the teleport so that the player cannot simply spam the input to teleport super fast. I am using a player controller that i bought from the asset store since a friend told me it was a better idea than doing it myself. Thanks alot!
PS: sorry for the spelling mistakes and bad grammar, english is not my main language.,hi, im new to unity and i am currently making my first 2d platformer. I am trying to make a Teleport input but i have no idea where to start. Basically, i want the character to teleport right or left (depending on which side he his facing) and i want the distance to be based on how long the player is holding the teleport input (ex: Spacebar). I would also like to have an animation that starts on button release and that ends when the character is teleported to the new location. finally, i would like to add a sort of cooldown to the teleport so that the player cant just spam click and release the input and teleport super fast. I am using a player controller that i bought on the asset store since a friend told me it was better to start with that. If this is too complicated to be explained in a forum post i would be willing to pay someone to help me create the script and understand it. Thanks alot!