Camera Movement

Ok so i have a few questions. How would i make it so when i click on an object and drag, it will rotate whatever way im dragging it? Also, how would i make it so when i scroll in i zoom in and vice versa?
Thanks,
Coonerboy

No one knows??

The zooming in and out is quite doable. Just move the camera along its local z-axis (with a motion actuator) every time you scroll up or down (mouse sensor).

As for making the object rotate, I’m assuming (correct me if I’m wrong) that you want it to rotate similar to pressing R > R in blender (trackball rotation). To do this in BGE will take python, as well as some math skills. I don’t know myself how to accomplish this, so you’ll have to find out from someone else, or figure it out on your own. This is where your parents were right for once, telling you that math is useful. Damn :slight_smile:

OK i get the zooming out thing (why didn’t i think of that).
As far as rotating goes, i want it to rotate kind of like how you rotate the earth on google earth.
Except im not using a planet.

You could use the MouseOrbiter for rotation. Parent the object to be rotated to the MouseOrbiter.

I hope it helps

Heres an example of rotating an object with the mouse I made a while ago.

Attachments

track_ball_example.blend (79.5 KB)