- Home /
Question by
adontzy · Feb 29, 2020 at 03:51 AM ·
c#charactercontrollermovement scriptattack
question with character controller to move with hitting mousebuttton down
case 1: coolDown = 0.2f; transform.Translate(Vector3.forward 3 Time.deltaTime 3);//dont work //Vector3 slashvector = new Vector3(0,0,7); //this.GetComponent().Move(slashvector Time.deltaTime*33);//work
i was trying to do combo attack with switching case , but err problem is to move character controller with getmousebutton down ? the code which works can move but rotation is set to world space , even i set to space.self still didt fix . the code which dont work i dont really know how to fix it , please help
Comment
Best Answer
Answer by adontzy · Feb 29, 2020 at 04:36 AM
The solution is Vector3 slashvector = transform.forward ;
Your answer
![](https://koobas.hobune.stream/wayback/20220612224136im_/https://answers.unity.com/themes/thub/images/avi.jpg)