0
$\begingroup$

I tried to program something that makes the camera look at the mouse for one of my games, but it keeps giving this error on line.7:

Python.001(Camera), Python script error
Traceback (most recent call last):
  File "Look.py", line 7, in <module>
KeyError: 'requested item "Mouse" does not exist'
Blender Game Engine Finished

The code on line.7 is this: ms = c.sensors["Mouse"]

c is the "currentcontroller" variable that I'm currently using.

I've watched tutorials and all of them give me this same error.

$\endgroup$

1 Answer 1

0
$\begingroup$

Hello and welcome to BlenderStackExchange,

The Mouse string is a reference to a Mouse sensor with type Movement for receiving mouselook input.

Your setup should look like this:

enter image description here

$\endgroup$
2
  • $\begingroup$ thanks that helped :) $\endgroup$
    – beware4
    Sep 12, 2021 at 1:41
  • $\begingroup$ Glad I was able to help. If my post seems to be the answer, please consider marking it as the thread solution. $\endgroup$
    – RPaladin
    Sep 13, 2021 at 16:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .