Thanks, but I'm still not getting the crouching behaviour to work (I am running a script outside of the editor and I am sure I am using the latest update). Here are the relevant code lines I have written:
controller=CreateController(1.8,0.45,0.25,45,0) -- the last value (0) is the crouch height
This line does the update:
controller:Update(camerayaw,move,strafe,jump,40,10,crouch)
The next lines capture the crouch key being pressed:
if KeyHit(KEY_C)==1 then
if controller:IsCrouched()==1 then
crouch=0
else
crouch=1
end
end
Pressing the C key causes nothing to happen. I also replaced "crouch" with "1" in the controller:Update line above and still saw no crouching behaviour.