464542 (1) [Avatar] Offline
#1
Code
[ 211 KB ]
Hello, i am currently learning in unity version 5.6.0. When i wrote the code which provided in listing 2.5 and clicked on MouseY in axes menu in MouseLook and after hit play. I can't really control my character movement, because when i hit play it stands on 45 degree on X axis and i can't do anything with that. I' ve checked my code 10 and more times and i can't really understand where is the problem. It would be great if you'll help me with my problem.
Also, i don't understand why MonoDevelop doesn't highlight methods in my code. Any suggestions?

jhocking (159) [Avatar] Offline
#2
464542 wrote:I can't really control my character movement, because when i hit play it stands on 45 degree on X axis and i can't do anything with that.


I'm not entirely sure what you mean by "can't control character movement"; do you mean that the capsule just stays at that angle and doesn't rotate when you move the mouse? btw it being stuck at 45 degrees makes me suspect that it's simply hitting the rotation limit right away (note that the min/max rotation values are 45) which often means a mistake when clamping the value. However the clamp command you wrote looks correct to me so I'm not sure what the issue is. Maybe your mouse is just really sensitive?

464542 wrote:i don't understand why MonoDevelop doesn't highlight methods in my code. Any suggestions?


MonoDevelop does suggest methods to auto-complete when you start typing one, is that what you mean by "highlight"? Otherwise I'm not sure what you mean and need more explanation.