debuggingmyhead
New member
Hello,
I'm using UFPS2 and I'm trying to implement a dash ability and have some questions. I apologize in advance if these might be general Unity questions, in which case I can seek answers elsewhere too.
Right now I have a "dash" ability script that I created and it works decent enough, but not quite what I'm trying to achieve. What I'm doing is when the ability starts, I'm applying a force via AddForce on the locomotion script based on the player's current velocity (so that they can dash in the direction they're pressing). This does work and pushes the character quickly in a direction, but it kinda jumps to the new spot, and it doesn't seem "natural".
Which brings me to my questions:
Any help is greatly appreciated!
I'm using UFPS2 and I'm trying to implement a dash ability and have some questions. I apologize in advance if these might be general Unity questions, in which case I can seek answers elsewhere too.
Right now I have a "dash" ability script that I created and it works decent enough, but not quite what I'm trying to achieve. What I'm doing is when the ability starts, I'm applying a force via AddForce on the locomotion script based on the player's current velocity (so that they can dash in the direction they're pressing). This does work and pushes the character quickly in a direction, but it kinda jumps to the new spot, and it doesn't seem "natural".
Which brings me to my questions:
- Am I even going about this the right way (i.e. applying force at ability start via locomotion script)?
- If I add the force and choose more than 1 frame, does it get spread out evenly over all frames? And would that be the proper way to handle the physics of a dash?
- How might I go about preventing user input from effecting the movement physics during the duration of the dash?
- I'm also attempting to have two dash behaviors: quick tap is a normal length dash, and a long press in a longer dash. Each type would have a specific time duration (not based on the length of the button press) - Could you shed some light on how I might implement that via Abilities? Perhaps they should be separate abilities?
Any help is greatly appreciated!