Camera Shake based on transform location

Hi, I’m really liking the camera shaking system that Cinemachine has, but I find that I’m not able to create a camera shake whose location can be updated with infinite sustain.

For example, with engines on a spacecraft, if I use m_HoldForever = true, it will shake forever, but only at the position at which the impulse definition created the event. If the spacecraft moves, the shake source is at the original event position, and doesn’t move with the spacecraft.

It would be great if there were an API where we can pass in a transform so that the source location can be updated, in case the camera shake source objects move.

Is this already possible somehow?

I wouldn’t use HoldForever. Could you instead just keep emitting short overlapping bursts of signal?

1 Like

After some tweaking, for fast spacecraft, I tried firing a shake 10 times a second but with overlapping attacks/decays, and it seems to look fairly consistent. Should hold forever not be used in general, or do you mean for this use case?

I meant for this use case. If you want to use it, you need to keep a handle to the noise event, and delete it eventually.

1 Like