I’m trying to create a charge attack similar to Reinhardt’s Charge in Overwatch, but I’m not exactly sure on how I should go about it. The main things I’m having issues with is switching the cameras during the charge and how to set up a timer for the charge. Any other tips are extremely helpful.
@Llama_w_2Ls In game, the camera zooms out to third person to allow for better steering. Essentially, the charge is just one rocket boost forward with a slower turning speed with no way to stop other than the charge time running out or you crash into a wall. You can also “pin” enemies, where they become stuck to the player model and it also does damage to them if you collide with a wall. I really just need to figure out a way to get a model to burst forward and have difficulty turning, thus when the third person camera comes into play.
If your character has a rigidbody character controller, you can addforce on its transform.forward direction, to create a burst-like charge attack.
To have difficulty turning, you would simply need to lower the sensitivity of your camera control.
Finally, for a third person camera, change its transform.position to be a bit higher on the y, and a bit back on the z, to make it look third person.
If the character is a rigidbody controller, it should automatically stop when hitting a wall. If (like in TF2) you would want the charge to be also stopped by swinging your sword/weapon in mid-charge, you can add a counter-force in the opposite direction of the player.
Hope it helps.
You may need to change the way your movement works, if it isnt rigidbody, or you would have to simulate its effects. @JediJerboa