Howdy, I just had a question about how best to approach a particular task using Cinemachine's Impulse Sources and Listeners. I have a Source + Listener system working great! However, it seems the best I can do is pass in a magnitude (vector 3) to determine how strong an impulse it should be. I'd like to also be able to dictate the amount of time/decay that an impulse has when calling GenerateImpulse(). Is there a way to accomplish this? Thank you for your time and assistance!
This option will do it to some extent, but at the moment there is no explicit fine-grained control over that. Alternatively, you could write a little script that exposes an API that takes a time parameter, and scales the appropriate fields in the source before generating the impulse.
The second option sounds like it's more up my alley. I'm a bit new to working with external APIs, so I went looking around in the CM version 2.3 API online and found the "Class CinemachineImpulseDefinition" > "Field m_TimeEnvelope", with the struct EnvelopeDefintion that contains m_SustainTime and m_DelayTime. I'm thinking these are the two I would want access to, am I correct?
Indeed you are correct. If you're using CM 2.3 then you should consider upgrading. The current version is 2.6.3.
I mistyped, I forgot the middle '.6' I'll see if I can figure out how to interface with those. Never tried exposing API properties before lol