Question by
Legendairy · May 30, 2017 at 06:02 PM ·
unity 5charactercontrollerspeedjumping
Help please! Why can't I reduce the speed before jumping?
I just want to have my player jump at a speed of 6 and then go back to whatever the speed was before... It shows the changes but the jump is unchanged..
screenshot-98.png
(169.6 kB)
Comment
Answer by toyester · May 31, 2017 at 03:08 AM
Hi,
Right now it looks like your problem is that you are not using your speed variable anywhere apart from the start function did you mean to have this on line 38
controller.Move(moveDirection * Time.deltaTime * moveSpeed)
also in the future you may want to use the code sample button to share code, rather than screenshot it