Free look Mouse ScrollWheel and block axis control

Hi,

In some 3rd person camera experience especially in MMORPGs you can rotate the camera pressing right click in the mouse and you can control the Z position of the camera using the Mouse ScrollWheel, have any way to do this with cinemachine or i have to do a custom script?

Regards.-

Pretty easy to set up with a simple script to adjust vcam parameters.
Can you be a little more specific about what kind of camera movement you want?
e.g. rotate means camera aim adjustment or orbital rotation about some look-at target?
and z-position means…?

Yes, i recorded from my game with my scripted camera, you can see the rotation only pressing some button (in this case mouse right click - drag) and you can see the camera moving away and get closer (in this case using mousewheel).

Video:

Regards.-

ok, so you’re talking about orbiting around the target.
Mousewheel controls the radius. Got it.
What happens when you drag vertically? Is the camera moving in a sphere around the target, or is it describing a cylinder? Or some other shape?

In sphere around the target.

I used a hierarchy childs for move different axis and z.

And i am interested in remove all my camera system and add all cinemachine.

Regards.-

ok. Use an ordinary vcam, with Transposer and Composer. Set the transposer Binding Mode to World.

Nothing out-of-the-box. You will need to make a custom script to manipulate the transposer’s m_FollowOffset field based on your mouse input. For rotation, rotate it. For zooming, scale it. You will need to set limits on the vertical rotation, to avoid making the camera look straight up or straight down (vcams get confused when they do).

You can access it as follows:
vcam.GetCinemachineComponent().m_FollowOffset = bla;

1 Like

it’s a shame that there is nothing out of the box to handle this kind of third-person behavior :cry:

Well, I finded the expected behavior passing the mouse wheel value in to the radius value in the Orbit array using the Freelook component.

Video:

1 Like