Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Not Building on iOS and collisions issue
#7
(05-05-2020, 08:24 AM)josemendez Wrote: 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]

Hi while you here. Could you please tell me about the unity particles. Why they don't show where the water is . i am using simple water.
Reply


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