# Cinemachine freelook mouse down

**URL:** https://discussions.unity.com/t/cinemachine-freelook-mouse-down/778268
**Category:** Cinemachine
**Created:** [February 25, 2020, 10:10pm UTC](https://discussions.unity.com/t/cinemachine-freelook-mouse-down/778268 "2020-02-25T22:10:04Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Gregoryl](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/gregoryl/32/101869_2.png) [@Gregoryl](https://discussions.unity.com/u/Gregoryl)
#### Post date: [February 25, 2020, 10:15pm UTC](https://discussions.unity.com/t/cinemachine-freelook-mouse-down/778268/2 "2020-02-25T22:15:25Z")

</div>

> [@How do I make a CinemachineFreeLook orbiting camera that only orbits when the mouse key is down?](https://discussions.unity.com/t/698898/5):
>
> using System.Collections; using System.Collections.Generic; using UnityEngine; using Cinemachine; public class CMFreelookOnlyWhenRightMouseDown : MonoBehaviour { void Start(){ CinemachineCore.GetInputAxis = GetAxisCustom; } public float GetAxisCustom(string axisName){ if(axisName == "Mouse X"){ if (Input.GetMouseButton(1)){ return UnityEngine.Input.GetAxis("Mouse X"); } else{ return 0; } } …

---

_[View the full topic](https://discussions.unity.com/t/cinemachine-freelook-mouse-down/778268)._
