Real time object x/y-rotation with mouse?

Hi

I would like to animate the airplane control stick movements, while user is controlling the airplane with mouse (or joystick).

The controll stick movements should be limited to +/- 10deg on local y-axis and +10/-20deg on local x-axis, not matter how far the user is pushing the mouse.

Also I would like to adjust of the mouse-to-stick responce speed. This would simulate the increasing control forces due velocity.

Is it possible to do this kind of set up in BGE? Any related topics?

Hi

I modified the mouse look script and get pretty nice result with stick movements. The response is nice and crispy.

Only problem is now to find a way to limit the movements. I tried to use the getOrientation data with not so good results. The stick moves nicely to the limit and then stuck to it.

Is possible to use the armatures for this axis movement limiting task? I’m a absolute noob with the armatures.

The attached file contain a unlimited stick sample.

Attachments

Mouse_stick02.blend (167 KB)

So far so good

Attachments

Mouse_stick03.blend (122 KB)

hey i’m a real noob but can somebody transform this sample for me so that the stick displays the angle of a my joystick?

THX MystBoy

hi

No stick version available yet, but take a updated(wip) mouse version :slight_smile:

Attachments

Mouse_to_stick_01.blend (152 KB)

Hi

Here is updated version.

On the ‘Text’ named script line 21 you can assign the mouse movements to the stick.

Current I need a ‘IF’ for the task. Is it possible some how to make this assign in initializing phase, so there’s no need for the ‘IF’ in actual running phase?

Thanks

Attachments

Mouse_to_stick_02.blend (155 KB)

Hi

I cleaned this a bit.

Attachments

M2S01.blend (147 KB)