Cinemachine Collider : Multiple Obstacle Resolutions

Hi there! We are looking for some specific behavior with the Cinemachine Collider. We want it to immediately respond when the player is obscured, but smooth in when the player is “in danger of being obscured”.

A.K.A. multiple obstacle resolutions.

7876801--1001533--Cinemachine Collider.png

I tried implementing this on my own but Cinemachine quickly proved to be a spiderweb of code and rules that, well, simply wasn’t worth it for our game (while I have the opportunity to say this, I am super impressed and happy for everything Cinemachine has done and continues to do for me).

Nevertheless, I thought it would be a cool feature. The idea was actually inspired by Breath of the Wilds camera, so you can even get away with playing Zelda in the name of ‘research’ :smile:.

Hi

It is not possible with the base Cinemachine Collider. You could write your own Cinemachine Collider though, that does this.

An idea, that may work :slight_smile:
Copy the CinemachineCollider script and modify it to have two camera radiuses: one radius r for immediate response, and one radius R for smooth response. r should be smaller than R.

  • If an obstacle hits sphere with radius r, then you respond immediately → no damping.
  • Else if an obstacle hits sphere with radius R, then you respond smoothly → some damping.

Basically, you’d be combining these two cases:
Immediate:
7877671--1001761--Immediate.png
Smooth:
7877671--1001758--Smooth.png

I watched a couple of gameplay videos, but I could not find the camera behaviour you describe. :hushed:

1 Like