- Home /
[CLOSED] Can't Move Left Or Right (a/d) In This Movement Script? [CLOSED]
EDIT: You CANNOT have CTRL a/d/s IN EDITOR! IT WILL NOT DO ANYTHING DUE TO SHOORTCUTS IN EDITOR!!! Hope this helped anyone having a similar problem :)
For some reason, when crouched, you cant move left or right (a/d) you can only move forward? (w/s)
Are you using $$anonymous$$ecanim or Legacy? If legacy, do you have separate animation for crouch-strafe? If in mecanim, have you set crouch and walk to separate layers for additive mixing with a bodymask or same layer for blending?
No, if you look at the code, it just makes the character controller smaller, but somehow, it also stops you from moving left or right
What happens to the model when the controller is made smaller? Does it actually crouch? And does the animation still play? I'm thinking, check you are not getting stuck in the floor and also check the drag on the rigidbody.
Also, I can't spot anywhere that a value is put in to CrouchSpeed.
It's in the inspector, but it's stated in before start() (crouch speed) and no, there is no animation played for crouching, and no, I'm not getting stuck on the floor, as I can still move forward and backward, the only thing that happens, is the char controller shrinks in height :) (thanks for answering)
I see : var CrouchSpeed : float; but the float has no actual value assigned to it. Are you hitting play and assigning a value manually in inspector?
Your answer
Follow this Question
Related Questions
How to change player direction with one button?,How do I make one button change direction of player? 0 Answers
Help with movement script? 0 Answers
SendMessage throwing "No appropriate version of 'UnityEngine.GameObject.SendMessage' 1 Answer
rollaball ball wont move 2 Answers
IAP doesn't work in google play store (on device) but works fine in the editor. 0 Answers