cancel
Showing results for 
Search instead for 
Did you mean: 

WWise Crash Help

oh_cripes
Honored Guest

I've been integrating Wwise into our game and it seems to run ok on PC and in the editor but crashes on Quest. This seems to happen just after loading the level and started happening after adding some code to trigger events when physics objects collide. The code is basically:

 

public class CollisionSfx : MonoBehaviour
{
    public AK.Wwise.Event ImpactEvent;
    public AK.Wwise.Switch MaterialType;
    public AK.Wwise.RTPC ImpactMass, ImpactVelocity;
    private Rigidbody body;

    void Awake() {
        body = GetComponent<Rigidbody>();
    }

    void OnCollisionEnter(Collision collision)
    {
        MaterialType.SetValue(gameObject);
        ImpactMass.SetValue(gameObject, body.mass);
        ImpactVelocity.SetValue(gameObject, collision.relativeVelocity.magnitude);
        ImpactEvent.Post(gameObject);
    }
}

 

Any one out there got any ideas?

0 REPLIES 0