Did anyone make a Controller for Mouse to steer camera pos and look At in 3D?

Hello all,

did anyone make a Controller with onscreen buttons for the Mouse
to steer the camera pos and look At in P3D?

Thanks!

Happy new year!

Chrisir

1 Like

I use the arrows and ASDW to control the flying in https://infinitefunspace.com/p5/fly/, but you could presumably map whatever controls you like to it.

p5 has the orbit controller which uses an outside-in control where the camera rotates about the lookAt point rather than around the eye point. See https://infinitefunspace.com/p5/ball/ for an example. Swipe with the mouse or your fingers on a touch screen to rotate.

3 Likes

I can’t see the source code there

I was thinking more of processing though

Inspect in Google Chrome will help.

:)

Hit F12 to “inspect” as @glv said.

The orbit controller is deeply embedded in the p5 camera controls, so that would be hard to port, but the keyboard controls in my fly program are simple to convert to Processing. Just replace each p5.Vector with PVector for the most part.

1 Like

very impressive

I made my own now when anyone is interested

These are the commands. You enter a key 0…5 and this changes what the mouse does when you move.

  • 0 to change camera Pos x/y with mouse (click and hold outside the green box, the dist to the box is the speed)

  • 1 camera Pos XZ

  • 2 LookAt x/z (circle)

  • 3 LookAt x/y

  • 4 Camera Pos moves in a Circle around LookAt

  • 5 Move both Camera Pos and LookAt x/y

  • Esc reset camera

Have I forgotten something?

Chrisir