orbit the idea - daft question

I recently picked up the bge, I am using blender 2.53 and I am working on a beyblade prototype game. Recently i have been trying to implement an orbiting camera.
I have been 90% succesful! I used the Camera actuator, and the Q and E keys to move the camera to either side :yes:. Which is a nice orbit feature :confused:, however I would love to make it so that my mouseā€™s movements replaces what Q and E do now.

How can i set up my mouseā€™s movement to control the camera local sideways (local -x) position?

Once again, sorry about this daft question, and thank you :rolleyes:

EDIT: Hereā€™s my current set-up : peldron

Look at the MouseOrbiter.

To transfer

  • mouse values to properties
  • property values to acutator values
  • mousevalues to actuator values

see A2A

I hope it helps

Aha! Thank you :eyebrowlift: Iā€™ll see what I can come up with.

Geez O.Oā€¦ got to get my head around this stuff.

i am back, and i realize i should start with something much simpler.
If i have an object and want it to reset itā€™s orientation back to 0,0,0 every time I press ā€œRā€,
What would the script for this look like? This will help me in my journey a great deal.

I have made a step forward, and use:

beyblade.alignAxisToVect([1,1,1], 1, 0.2)

would anyone happen to know why the following one does not work?


vectTo = beyblade.getVectTo([0, 0, 0])
beyblade.alignAxisToVect([vectTo], 2, 0.2)

I get the following error


Error setting vector, 1 args, should be 3

It feels like i am missing something quiet obviousā€¦
Thanks lads, even if i donā€™t get a reply :smiley: This forum is great.

EDIT: Stupid me, all i had to do was align the z-axis to the world z-axis!


beyblade.alignAxisToVect([0.0,0.0,1.0], 2, 1.0)