Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Not Building on iOS and collisions issue
#6
Hi,

I just answered your email and sent 5.1 to you.

Can you share more info about how have you set this up? what does your code look like? Getting collision callbacks should be pretty straightforward.
Setting up a plane collider, subscribing to the solver's OnCollision event and calling Debug.Log() from it works fine for us. Here's the code we used:

Code:
using UnityEngine;
using Obi;

[RequireComponent(typeof(ObiSolver))]
public class CollisionLogger : MonoBehaviour {

    ObiSolver solver;

    void Awake(){
        solver = GetComponent<Obi.ObiSolver>();
    }

    void OnEnable () {
        solver.OnCollision += Solver_OnCollision;
    }

    void OnDisable(){
        solver.OnCollision -= Solver_OnCollision;
    }
    
    void Solver_OnCollision (object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
    {
       Debug.Log("collisions!");
    }

}

And the results:

[Image: Mj6lgPp.png]

The CollisionEventHandler sample code works fine too, but you need to have Gizmos enabled to be able to see the contacts it draws:

[Image: fR3U7B5.png]

Regarding bubbles, what have you tried? placing a regular particle emitter with a particle advocator component should do it (see http://obi.virtualmethodstudio.com/tutor...ction.html). There's also a couple sample scenes that use advection (FluidFoam and FluidKarmanVortex)
Reply


Messages In This Thread
RE: Not Building on iOS and collisions issue - by josemendez - 05-05-2020, 08:24 AM