void ChangeForce() { Vector3 vec = transform.position - target.position; magnitude = (vec.magnitude) / 1000; directionEffect[0] = vec[0]; directionEffect[1] = vec[1]; directionEffect[2] = vec[2]; setIntPtr(); PluginImport.StopEffect(effect_index); //Set the effect PluginImport.SetEffect(_type, effect_index, gain, magnitude, duration, frequency, _position, _direction); PluginImport.StartEffect(effect_index); }
public void stopEnvironmentFriction() { myFrictionScript = transform.GetComponent <FrictionEffect> (); PluginImport.StopEffect(myFrictionScript.effect_index); }
public void stopEnvironmentSpringForce() { mySpringScript = transform.GetComponent <SpringEffect> (); PluginImport.StopEffect(mySpringScript.effect_index); }
public void StopEnvironmentConstantForce() { myContantForceScript = transform.GetComponent <ConstantForceEffect>(); PluginImport.StopEffect(myContantForceScript.effect_index); }
public static void StopEnvironmentForce(int index) { PluginImport.StopEffect(index); }