Hello everybody,
my problem occured at starting up a car engine sound for my unity project.
If I press “play”, my RPM and my AccelInput value stay on their initial value, I gave them before starting, but the two values should adapt dynamically to my trigger input.
I can see the car moving, so there is an controller input to the project, but it does not change the value for RPM or AccelInput.
I think maybe the update does not work properly, but i could not find a way to fix it.
That is the relevent part of my script, would be great if someone could help me out, thanks already!
void Start ()
{
cachedRigidBody = GetComponent<Rigidbody>();
FMODUnity.RuntimeManager.AttachInstanceToGameObject(CarEngine, GetComponent<Transform>(), GetComponent<Rigidbody>());
CarEngine.start ();
}
void Update ()
{
CarEngine.setParameterByID(RPMParameterId, (float)CC.CurrentSpeed);
CarEngine.setParameterByID(AccelInputParameterId, (float)CC.AccelInput);
}