Camera Orbit Right Click - Help Please

Hello everyone, ive been watching tutorials and reading up what I can but I cant see the connection of how to do the orbiting camera by holding in right click and dragging around.

Do I put it in the input controller first and then connect it...argh at such a lost. Any pointing in right directions will help! :)

Thank you!

Tool: Unity 3D


  • I don't really know exactly what you're doing, there's not one way of doing anything. If you're following tutorials for orbiting camera, then you'll know how to do the orbiting camera.

    Then to do the right click thing, you have to make the game check whether right click is being held down, and enable/disable that action when the click/release event happens.

    This is how to handle right mouse click, from a google:
  • Whatever tutorial you are following would check input in the Update() method. Look for lines with `Input.GetAxis`. Now simply wrap all that in an IF statement with `Input.GetMouseButton(1)` as condition. This means that the stuff inside the conditional block only executes while the right-mouse button is held down.

    If you still struggle, then give a link to tutorial you followed and someone here can show you updated code. It is really simple.
  • WOrked perfectly, thanks Leslie!
Sign In or Register to comment.