Mouse controlled Camera?

how would one go about making a mouse look where the camera goes around the main dude… like… on… lost planet for enstince. so a 3rd person view with a mouse look :smiley:

I’m think I might try the 3d person tmplate that was posted a while back… but if it doesn’t work… yeah…

Hi There!
I was after something very similar and come across a tutorial, Sorry can’t remember where I got it from, but here is a blend file with the end result.

when in-game move the mouse to move the camera around the player (the cube :smiley: ) and spacebar will bring up the crosshair.

It’s very basic but should point you in the right direction :slight_smile:


ScorpTut.blend (171 KB)

I dont know the answer but my best guess is to constrain or parent the characters mesh to the camera. Like an armature but cant be sure i just made an animation for a light house and thats my exp. under the belt lol.

Your .blender python codes are confusing lol.

hehe, the is one from, so it’s one you save as a text file and re-use - works very well.

What you want to look for is the way the logic bricks are set up. You’ll notice that the UpDown brick is linked to the camera which is the pitch of the mouse, and the LeftRight brick is linked to the player/cube object and rotates it.

The camera is also parented to the player/cube so it will move when the cube is rotated :slight_smile:

hmm… for some reason my last post didn’t come through… (sorry for the double up if it does!)

The script is one from, it is best to save this as a text file and use it when needed - what to look for is the way the logic bricks are set up.

You’ll see that the UpDown actuator is tied to the camera, so when the mouse pitch changes the script rotates the camera up and down (oh, the logic bricks must be called as they are, since the script is looking for those names).

The LeftRight actuator is tied to player cube and rotates it according to the mouse movement. The camera is parented to the player cube, so when the player moves, so does the camera. :slight_smile:

hey I think I got it thanks :slight_smile:

I had like two replies to this thread to explain the blend file, but they didn’t show up???
Basically ignore the - that’s a handy file to keep and reuse, but the meat of it is the way the logic bricks are set up, and to know to parent the camera to the player :slight_smile: